Every time I try to use a label in my test program for filling the screen and displaying text it gives me an 'Unknown Opcode' error in spasm when I try to compile.

For example:

Code:

    ld a, $E0
    ld hl, vRam
    ld bc,320*240*2
    call _MemSet
    ld hl, Test
    call _PutS
    call _getKey
    ret
Test:
    .db "Why won't this work?", 0
I tried it in spasm and it worked fine. Maybe try different names then "test" or not starting with a capital letter?
c4ooo wrote:
I tried it in spasm and it worked fine. Maybe try different names then "test" or not starting with a capital letter?


I tried that, and it didn't work. It just outputs:

Quote:
Pass one...
filltext.asm:17 error SE113: Unknown opcode 'Test'
Press any key to continue...


It says that for every label I try. The only thing that changes is the replacing Test with whatever the other label is.
Be sure to remove all spaces and tabs before the label name.
PT_ wrote:
Be sure to remove all spaces and tabs before the label name.


That fixed it! I didn't know spaces counted, thanks!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement