8085 Assembly Language

Soldato
Joined
18 Feb 2003
Posts
5,817
Location
Chester
Don't suppose theres anyone that can figure out why this code wont assemble is there...its got me!

Problem code -
Code:
Decrypt:  CALL    189C
          PUSH    PSW   ; copy stack pointer to A reg and increment stack pointer by 2
          MOV     A, C
          ANI     3C    ; AND the imediate data
          RLC           ; shift bits left
          DCR     A     ; subtract 1 from the value in the A register
          MOV     D, A
          POP     PSW
          XRA     D     ; reset the D register to zero
          XRA     C     ; reset the C register to zero
          RRC
          RET
          POP     DE    ; 
          MOV     M, A
          INX     H
          INR     D,    ; add 1 to the D register
          JNZ     183D
          ret

Error Message -
Code:
        182B    CD001A   DECRYPT:  CALL  189C                                  
      RC = 4: Invalid decimal number
 
Not sure about 8085 asm....
Sure there's not a problem with your subroutine 189C ? Sorry not much help.
You should try step through it line by line since that error message seems pretty poor :)
 
Last edited:
well it could be, but i don't know why that'd be it...its a valid memory location as far as my documentation shows...

and i can't step through the assembler step by step - only the simulator...and i can't use that until my new source is assembled. :(
 
|Show| said:
Code:
        182B    CD001A   DECRYPT:  CALL  189C                                  
      RC = 4: Invalid decimal number
Says it all - it is expecting a decimal integer, of which 189C is not, it is hex.

Have a look at how to encode a hex number in there (its been 26 years since I did any 8080/Z80 code) - it may be a leading ampersand, or an ampersand and a h (e.g. &189C or &h189c)
 
Back
Top Bottom