1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

8085 simple subtraction and output

Discussion in 'Assembly Language Programming (ALP) Forum' started by Moedig, Jan 8, 2010.

  1. Moedig

    Moedig New Member

    Jan 8, 2010
    Likes Received:
    Trophy Points:
    Hey all, I'm new to assembley and this forum, I'm currently doing a module on low level programming in my college course. We were given task to make a simple program and I'm trying to make one that does the following:

    Loads '50' into the C register and the accumalator, subtract '1' from the accumalator and output the result, then decrement 1 from the C register until '0', if it isnt 0 then loop back to 'subtract '1'' and continue untill C=0. Then halt.

    So far I have:

    MVI C,$36
    LDA A,$36
    NXT: MOV A,M
    SUI A,$01
    DCR C
    OUT $FF

    When I try to assemble this I get rc=5 undefined label on line 3 (NXT: MOV A,M)

    I'm really stuck, any help would be greatly appreciated, thanks :) (I'm sure that alot of this is wrong but its my first attempt and just need pointing in the right direction please, thanks)

Share This Page