Assembly Language

Discussion in 'Programmer's Corner' started by nanobyte, Dec 14, 2004.

  1. nanobyte

    Thread Starter Senior Member

    May 26, 2004
    118
    1
    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.
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    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.
     
  3. nanobyte

    Thread Starter Senior Member

    May 26, 2004
    118
    1
    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: :(
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Hi,

    Looks like you're not running a loop to load all your grades in.
     
  5. WildZBill

    New Member

    Dec 18, 2004
    6
    0
    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.
     
Loading...