2

Code

STACK .EQU 2099H
.ORG 0000H
    ld  SP, STACK
    jp 2000H

.ORG 0038H
    jp  service_routine

.ORG 2000H
    EI
    IM 1 ; <------- THIS LINE 
    LD  A, 00H

LOOP:
    ADD A, 00H
    jp  z, LOOP

service_routine:
    DI
    ld  A, 55H
    out (07H),A
    ld  A, 00H
    EI
    ret

Error

Using this online IDE http://clrhome.org/asm/

It gives me: Unknown instruction or directive IM (line " IM 1" in hello_z80)

So?

Am i doing something stupid here?

I have no clue as to why i get this error.

Haven't had any luck with google.

  • Their assembler doesn't appear to to support that OP code. What do they say about it? – Preet Sangha Aug 13 '12 at 02:23
  • using another assembler and it works fine – user1530335 Aug 13 '12 at 04:29
  • 2
    I tried "IM1" (some assemblers accept only that form), but it didn't work either. I've let DeepThought know about it. In the meantime, you can `#define IM1 .db $ED, $56` and use `IM1` as a macro. – harold Aug 13 '12 at 06:55

1 Answers1

2

As I said in the comments, I've let DeepThought know about it. I just hopped on the chat at Omnimaga (DeepThought is an admin there), and he told me he has fixed it.

IM 0, IM 1 and IM 2 all work now. They assemble and autocomplete knows about them too.

So in answer to your question, yes, it was in fact a bug and not your fault.

harold
  • 61,398
  • 6
  • 86
  • 164