unclenumbers
unclenumbers

Reputation: 11

TASM - unrecognized argument

I'm trying to write a small z80 program for a ti-84+ and TASM doesn't recognize my arguments for the OUT instruction.

This should be the syntax for the OUT instruction, but TASM doesn't seem to recognize it.

OUT ($10) , $05

Expected Result: no errors, but the actual result is unrecognized argument. (($10),$05)

Upvotes: 0

Views: 320

Answers (1)

Nathaniel Smith
Nathaniel Smith

Reputation: 106

I've had this same problem before, the fix is that you cannot give a number to the OUT opcode, you need to use a register. The new code that you would need would be the following

LD A, $05
OUT ($10), A

Another thing about the LCD screen ports is they are slow so i also recommend putting a delay after each use put,

_LCD_BUSY_QUICK    .EQU    $000B

At the beginning of your program because its the easiest delay. so the final code will be,

LD A, $05
OUT ($10), A
call _LCD_BUSY_QUICK

Also tasm is very old and slow so if you get into programming more i recommend spasm as its faster, also if you choose to use spasm, run it through Command Prompt as its much easier then using visual studio and because you use tasm i assume you are already accustomed to using command prompt.

Hope this helps :)

Upvotes: 3

Related Questions