Re: A86: beginner needs help


[Prev][Next][Index][Thread]

Re: A86: beginner needs help



At 03:57 PM 9/20/97 -0400, you wrote:
>I need some help,
>
>I get the following error messages when I assembly this code:
>
>label not found (de)
                           unused data in MS byte of argument
>
>code:
>
>#include "asm86.h"
>#include "ti86asm.inc"
>
>.org _asm_exec_ram
>
>Start
> call _clrLCD
> ld de,Bitmap
> ld (hl),de        ; here is where i get the error messages, why?
>ret
>
>Bitmap:
> .db %00000000
> .db %01111110
> .db %01100110
> .db %01100110
> .db %01111110
> .db %00000000
>
>.end
>
You're trying to load _two_ bytes  - de - into (hl). I don't think you can
do that, let me check...Nope. So replace ld (hl),de with:
ld (hl),e
inc hl
ld (hl),d

or something like that. Also, make sure you put a space before all
instructions - like the RET - if you don't, TASM thinks it's a label, and
it does funny things. And you don't have a colon after Start. But you're
getting errors because you can't load a register pair into memory all at
once. So TASM doesn't recognize de as a valid operand for that instruction,
and looks for it as a label. When it doesn't find a label named de, it
issues an error message.

--Joshua Grams


References: