Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: Pawnerd on September 22, 2013, 01:28:06 pm

Title: unrecognised instruction
Post by: Pawnerd on September 22, 2013, 01:28:06 pm
Hi there,

I tried to assemble a simple asm script with tasm. The code is litterally copied from a tutorial, so it should work.

this is the batch that should compile my program:
Code: [Select]
@echo off
echo ==== Compileert %1.z80 voor de TI-83+ of TI-84+. ====
tasm64 -80 -i -b c:\asm\source\%1.z80 c:\asm\exec\%1.bin
if errorlevel 1 goto FOUTEN
cd c:\asm\exec
c:\asm\tasm\devpac8x %1
cd c:\asm\tasm
echo ==== Klaar; het programma is opgeslagen in Exec\%1.8xp ====
goto KLAAR
:FOUTEN
echo ==== Fouten!!! ====
:KLAAR
del c:\asm\exec\%1.bin > NUL
echo ==== Klaar ====

This is the example program:
Code: [Select]
.nolist
#include "ti83plus.inc"
#define    ProgStart    $9D95
.list
.org    ProgStart - 2
    .db    t2ByteTok, tAsmCmp
    b_call(_ClrLCDFull)
    ld    hl, 0
    ld    (PenCol), hl
    ld    hl, msg
    b_call(_PutS)            ; Display the text
    b_call(_NewLine)
    ret

msg:
    .db "Hello world!", 0
.end
.end

I copied the ti83plus.inc from here:
http://www.brandonw.net/calcstuff/ti83plus.txt (http://www.brandonw.net/calcstuff/ti83plus.txt)

And these are the errors I get whenever I try to assemble/compile the code:
Code: [Select]
c:\asm\Tasm>asm example
==== Compileert example.z80 voor de TI-83+ of TI-84+. ====
TASM Z80 Assembler.       Version 3.2 September, 2001.
 Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
c:\asm\source\example.z80 line 0007: unrecognized instruction.          (B_CALL(
_CLRLCDFULL))
c:\asm\source\example.z80 line 0011: unrecognized instruction.          (B_CALL(
_PUTS))
c:\asm\source\example.z80 line 0012: unrecognized instruction.          (B_CALL(
_NEWLINE))
tasm: pass 2 complete.
tasm: Number of errors = 3
==== Fouten!!! ====
==== Klaar ====

I am sure the `variables` _CLRLCDFULL, _PUTS and _NEWLINE are defined in the included ti83plus.inc file. So, I think, B_CALL() is undefined, but I am too noobish in assembly to be sure about that.

Can somebody help me a bit with this issue?

greetings

EDIT:

ahw, I see this is an dublicate of:
http://ourl.ca/15212

(Is there a moderator that can delete this post?)

sorry, for not googling enough before posting ..
Title: Re: unrecognised instruction
Post by: ElementCoder on September 22, 2013, 01:37:16 pm
That's ok, I hope your problem is solved now. Also use the "Edit" button instead of double posting next time :)
Title: Re: unrecognised instruction
Post by: Pawnerd on September 22, 2013, 01:55:27 pm
That's ok, I hope your problem is solved now. Also use the "Edit" button instead of double posting next time :)

The problem is completely solved, now I've got a nice `hello world!` text on my calculator.
Title: Re: unrecognised instruction
Post by: chickendude on September 26, 2013, 03:14:17 pm
Great :) I'd recommend using a different assembler, though. I use spasm (http://wabbit.codeplex.com/releases/view/45088). It's much easier, faster, smaller, less buggy, and more powerful/flexible. Another popular assembler is Brass (http://www.benryves.com/products/brass3).
Title: Re: unrecognised instruction
Post by: Pawnerd on September 26, 2013, 05:52:53 pm
Thanks, I didn't know about the existence of those compilers. I will have a look on them.
Title: Re: unrecognised instruction
Post by: Xeda112358 on September 26, 2013, 06:18:40 pm
I would also recommend spasm and Brass, but I would also recommend ORG (http://clrhome.org/asm/) as a good option.

I had lots of trouble with TASM, too.
Title: Re: unrecognised instruction
Post by: TIfanx1999 on September 26, 2013, 09:19:50 pm
^
TASM is know to be pretty picky. People are more familiar with the newer assemblers that Xeda listed. :)
Title: Re: unrecognised instruction
Post by: thepenguin77 on September 27, 2013, 10:28:17 am
I made another guy a simple little copy/paste asm suite if you want to use it. (It's based on spasm which is what I use)

link to post (http://ourl.ca/19553/360794).
Title: Re: unrecognised instruction
Post by: AssemblyBandit on September 28, 2013, 01:19:18 am
Great that your getting into it Pawnerd! I have to point out that Asm Studio 8x is the only IDE I use!
Title: Re: unrecognised instruction
Post by: chickendude on September 28, 2013, 03:26:33 am
It's nice, so is WabbitCode. If you're on linux, z80 Asm IDE by burntfuse is great, just that it comes with an older version of spasm. There's also a nice Mac version of WabbitCode. I've always been a notepad/gedit programmer myself, though...