Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

z80, TI calculator, .KEYS.INC error, won't compile

linux ti assembly z80 calculator 82 stats 83

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1 Kommandotolken

Kommandotolken

    CC Lurker

  • New Member
  • Pip
  • 7 posts

Posted 16 April 2014 - 11:48 PM

Hello everyone! I am using Lubuntu and wabbitcode to experiment with z80 assembly. I am a complete beginner and my experience in programming includes a little TI basic, C# and C++, but I am not fluent or especially good, though I have a little experience.

 

I am using the "ion" assembly shell for TI 83 on my TI 82 stats (te TI 82 stats is more similair to the TI 83, I have heard). And I can install Ion on it, so that's fine.

 

If I manage to compile a program in wabbitcode to an ti 82 or 83 format, and I send it to my calculator, it displays the program in the list, but I can't choose it. It says "L/hi". "hi" is the filename.

 

Program a

Program b

Program c <- The "cursors" stops here.

Program L/hi <- It won't mark it.

 

Though, if I delete all programs except for "hi", it works to execute it, but nothing special happens, it just put some text on the screen that looks like TIBASIC commands.

 

I will put the error messages down b

 

Error message in wabbitcode. If I "comment out" the  87th line, the program will compile, but then it just says "L/hi" on the TI program list.

Pass one...

KEYS.INC:87: error: Cant figure out this line
-VARS = 56 ;
VARS Y-VARS K_ANGLE = 57;
MATRIX ANGLE K_LIST = 58 ;
STAT LIST K_CALC = 59 ;
TRACE CALC K_QUIT = 64 ;
MODE QUIT K_LINK = 65 ;
x,T,theta LINK K_GRAPH = 69 ;
GRAPH GRAPH K_MODE = 70 ;
MODE MODE K_WINDOW = 73 ;
WINDOW WINDOW K_YEDIT = 74 ;
Y= Y= K_TABLE = 75 ;
GRAPH TABLE K_TBLSET = 76 ;
WINDOW TblSet K_TRACE = 93 ;
TRACE TRACE K_PLUS = 129 ;
+ + K_MINUS = 130 ;
- - K_TIMES = 131 ;
* * K_DIV = 132 ;
/ / K_POWER = 133 ;
^ ^ K_LPARAN = 134 ;
( ( K_RPARAN = 135 ;
) ) K_LBRACK = 136 ;
* [ K_RBRACK = 137 ;
- ] K_STO = 139 ;
STO> STO> K_COMMA = 140 ;
, , K_NEG = 141 ;
(-) (-) K_PERIODE = 142 ;
. . K_0 = 143 ;
0 0 K_1 = 144 ;
1 1 K_2 = 145 ;
2 2 K_3 = 146 ;
3 3 K_4 = 147 ;
4 4 K_5 = 148 ;
5 5 K_6 = 149 ;
6 6 K_7 = 150 ;
7 7 K_8 = 151 ;
8 8 K_9 = 152 ;
9 9 K_EE = 153 ;
, EE K_SEMI = 154 ;
0 ;
K_A = 155 ;
MATH A K_B = 156 ;
MATRIX B K_C = 157 ;
PRGM C K_D = 158 ;
X^-1 D K_E = 159 ;
SIN E K_F = 160 ;
COS F K_G = 161 ;
TAN G K_H = 162 ;
^ H K_I = 163 ;
X^2 I K_J = 164 ;
, J K_K = 165 ;
( K K_L = 166 ;
) L K_M = 167 ;
/ M K_N = 168 ;
LOG N K_O = 169 ;
7 O K_P = 170 ;
8 P K_Q = 171 ;
9 Q K_R = 172 ;
* R K_S = 173 ;
LN S K_T = 174 ;
4 T K_U = 175 ;
5 U K_V = 176 ;
6 V K_W = 177 ;
- W K_X = 178 ;
STO> X K_Y = 179 ;
1 Y K_Z = 180 ;
2 Z K_XTO = 181 ;
x,T,theta x,T,theta K_PI = 182 ;
^ Pi K_INVERSE = 183 ;
X^-1 X^-1 K_SIN = 184 ;
SIN SIN K_ASIN = 185 ;
SIN SIN^-1 K_COS = 186 ;
COS COS K_ACOS = 187 ;
COS COS^-1 K_TAN = 188 ;
TAN TAN K_ATAN = 189 ;
TAN TAN^-1 K_SQR = 190 ;
X^2 X^2 K_SQRT = 191 ;
X^2 SQRT K_LN = 192 ;
LN LN K_EX = 193 ;
LN e^X K_LOG = 194 ;
LOG LOG K_TENP = 195 ;
LOG 10^X K_ANS = 198 ;
(-) ANS K_COLON = 199 ;
. : K_QUEST = 203 ;
(-) ? K_QUOTE = 204 ;
+ " K_THETA = 205 ;
3 THETA K_LBRACE = 237 ;
( { K_RBRACE = 238 ;
) } K_ABS = 244 ;
X^-1 ABS K_L1 = 245 ;
1 L1 K_L2 = 246 ;
2 L2 K_L3 = 247 ;
3 L3 K_L4 = 248 ;
4 L4 K_L5 = 249 ;
5 L5 K_L6 = 250 ;
6 L6 K_n = 251 ;
9 n K_Vn1 = 252 ;
8 Vn-1 K_Un1 = 253 ;
7 Un-1

The program that I want to put in my calculator

#include "TI82.H"
#include "KEYS.INC"

.ORG START_ADDR
.DB "Example program",0

ROM_CALL(CLEARLCD)
LD HL,0
LD (CURSOR_POS),HL
LD HL,Data
ROM_CALL(D_ZT_STR)

Pause:
    CALL GET_KEY
    CP G_ENTER
    JR NZ,Pause
    RET

Data:
    .DB "My 1st Program!",0
.END

I hope this is enough. It really bugs me to not get it to work, haha, I was playing with all evening yesterday.

 

My goal is to be able to make a .z80 assembly program that does something "simple", convert it to a Ti calculator format and run it. That's all, it doesn't necessarily have to be this program. I can't seem to find a good z80 tutorial though.


Edited by dargueta, 17 April 2014 - 07:13 PM.
Fixed horrifying lack of formatting. :P


#2 dargueta

dargueta

    I chown trolls.

  • Moderator
  • 4854 posts

Posted 17 April 2014 - 07:14 PM

Did you compile the program as an assembly program on the calculator? You also have to run it with AsmPrgm(<program name>), not as a normal BASIC program.


sudo rm -rf / && echo $'Sanitize your inputs!'


#3 Kommandotolken

Kommandotolken

    CC Lurker

  • New Member
  • Pip
  • 7 posts

Posted 17 April 2014 - 11:59 PM

I compiled it on the computer, but it won't work. I have a shell for my calculator.

 

 

I have managed to get ZASM, but I don't know how to create a z80 assembly file.



#4 dargueta

dargueta

    I chown trolls.

  • Moderator
  • 4854 posts

Posted 18 April 2014 - 11:13 AM

Download and install this: http://z80gcc.sourceforge.net/. You'll need GCC first. You're running Lubuntu so I'm gonna assume you already have it.

 

Once you've installed it, you can compile your C/C++ code directly to a Z80 binary, and upload that to your calculator. You'll still have to run it using AsmPrgm() instead of just running it like a normal BASIC program.


Edited by dargueta, 18 April 2014 - 11:15 AM.

sudo rm -rf / && echo $'Sanitize your inputs!'





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download