Hi I have a simple program named leds.asm as shown below:
ORG 0100h
LD A,3
OUT (0),A
RET
END
When I do ASM LEDS it does not assemble the LD A,3 instruction. leds.prn contains:
0100 ORG 0100h
S LD A,3
S0100 D300 OUT (0),A
0102 C9 RET
0103 END
When I dump leds.hex I get:
0000 3A 30 33 30 31 30 30 30 30 44 33 30 30 43 39 36
0010 30 0D 0A 3A 30 30 30 30 30 30 30 30 30 30 0D 0A
0020 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A
There is only 3 bytes of object code, but there should be 5. The 2 bytes for the LD A,3 instruction are missing. Needless to say if I do LOAD LEDS and then run the program it does no work. I'm very new to ASM on CP/M. If I use z80asm under linux the program compiles correctly. I'd really appreciate it if someone would tell me what I am doing wrong. Thanks,
ORG 0100h
LD A,3
OUT (0),A
RET
END
When I do ASM LEDS it does not assemble the LD A,3 instruction. leds.prn contains:
0100 ORG 0100h
S LD A,3
S0100 D300 OUT (0),A
0102 C9 RET
0103 END
When I dump leds.hex I get:
0000 3A 30 33 30 31 30 30 30 30 44 33 30 30 43 39 36
0010 30 0D 0A 3A 30 30 30 30 30 30 30 30 30 30 0D 0A
0020 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A
There is only 3 bytes of object code, but there should be 5. The 2 bytes for the LD A,3 instruction are missing. Needless to say if I do LOAD LEDS and then run the program it does no work. I'm very new to ASM on CP/M. If I use z80asm under linux the program compiles correctly. I'd really appreciate it if someone would tell me what I am doing wrong. Thanks,