Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 13th, 2004, 06:56 PM
dmizzle06 dmizzle06 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 67 dmizzle06 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 33 m 52 sec
Reputation Power: 5
Help with processor coding

OK, I am taking a class about Intel Microprocessors. The teacher has a strong accent, so it is very hard to understand him. Right now I am trying to finish a program that will allow for the input of two single-digit numbers, followed by their summatiom displayed on a new line. I'm not even sure what it's called, I believe it's ASCII. Anyway, this is what I have so far:
PHP Code:
.model small
.code

MOV AH
01h specify which DOS routine to calldisplay for the ASCII code
INT 21h     
call DOS routine

MOV AH
01h specify which DOS routine to calldisplay for the ASCII code
INT 21h     
call DOS routine

MOV AH
00h ;
AAA         convert hex to ASCII code
ADD AX
,3030hanswer to ASCII
MOV BL
CL  ;

MOV BLAL  puts register AL into register BL

MOV DL
0Ah put register AH into register DL
MOV AH
02h specify which DOS routine to calldisplay the for the ASCII code in register DL
INT 21h     
call DOS routine

MOV DL
0Dh put register BL into regsiter DL
MOV AH
02h specify which DOS routine to calldisplay the for the ASCII code in register DL
INT 21h     
call DOS routine

MOV AH
,4ch  specify which DOC routine to calldisplay a carriage return
INT 21h     call DOS routine

.stack 256
end 


When I enter two digits, it's supposed to print out the sum on a new line. Something is wrong, and I can't seem to pinpoint what it is.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Help with processor coding


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT