Assembly Language

Thread Starter

nanobyte

Joined May 26, 2004
120
Is anybody out there familiar with Intel 80x86 Assembly Language, because I am in need of help bad. I am trying to create a program that accepts 10 characters from a keyboard input and determine how many are ASCII codes for "lowercase" letters and display these (only) on the monitor. The code I have so far is on the attachment below.
 

beenthere

Joined Apr 20, 2004
15,819
Hi,

You're not getting the result because your compares are only testing for "a" and "z". You have to test for the range of ASCII from 61h to 7Ah.

You might subtract 60h from the input character. If the result is positive, subtract 1Bh from that. If the result of the second subtration is negative, then the character has to be between 61h and 7Ah.
 

Thread Starter

nanobyte

Joined May 26, 2004
120
Okay I now have another problem. I am trying to make a program that take 12 grades and adds 8 to each one. My problem is the program keeps repeatly adding 2 and then 8 to the first number 12 times. I can't figure out what is the problem? :unsure: :(
 

WildZBill

Joined Dec 18, 2004
6
I don't know the specifics of that assembly language, but it looks like the label 'back:' should be moved up one line, so that you load the next number into the accumulator.
 
Top