Author Topic: unrecognised instruction  (Read 5829 times)

0 Members and 1 Guest are viewing this topic.

Offline Pawnerd

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 6
  • Rating: +0/-0
    • View Profile
unrecognised instruction
« 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

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 ..
« Last Edit: September 22, 2013, 01:53:46 pm by Pawnerd »

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: unrecognised instruction
« Reply #1 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 :)

Some people need a high five in the face... with a chair.
~EC

Offline Pawnerd

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 6
  • Rating: +0/-0
    • View Profile
Re: unrecognised instruction
« Reply #2 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.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: unrecognised instruction
« Reply #3 on: September 26, 2013, 03:14:17 pm »
Great :) I'd recommend using a different assembler, though. I use spasm. It's much easier, faster, smaller, less buggy, and more powerful/flexible. Another popular assembler is Brass.

Offline Pawnerd

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 6
  • Rating: +0/-0
    • View Profile
Re: unrecognised instruction
« Reply #4 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.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: unrecognised instruction
« Reply #5 on: September 26, 2013, 06:18:40 pm »
I would also recommend spasm and Brass, but I would also recommend ORG as a good option.

I had lots of trouble with TASM, too.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: unrecognised instruction
« Reply #6 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. :)

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1591
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: unrecognised instruction
« Reply #7 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.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: unrecognised instruction
« Reply #8 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!

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: unrecognised instruction
« Reply #9 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...