TI-BASIC to Asm Comparisons

z80 » Beginner

I had lost all copies of this page for a while and thanks to Andreas Finne who happened to have a copy backed up, the chart is back up.

Most TI86 owners are already proficient in TI-BASIC. To make use of that knowledge, I've constructed a table with common TI-BASIC operations and what it would look like in z80 assembler. All used assembler instructions are documented in the Instructions Section.

TI-BASIC
Assembler
:a+1→a
		
inc a

	
:a+45→a
		
add a,45

	
:ClLCD
		
call _clrLCD

	
:a→b
		
ld b,a

	
:If a==23
:Goto aIs23
		
cp 23
jr z,aIs23

	
:If a==23
:Then
:Ais23
:End
(Ais23 is a program)
cp 23
call z,Ais23

	
:For(b,1,10)
:ClLCD
:a+1→a
:End
		
	ld b,10
for_loop:
	call _clrLCD
	inc a
	djnz for_loop

	
:ClLCD
:Disp "Shutup"
		
	call _clrLCD
	call _homeup
	ld hl,string_label
	jp _puts
string_label: .db "Shutup",0


More from z80 » Beginner
Aliases // Convert from decimal to hexadecimal or binary // Flags and Conditions // Format and Compiling // Instructions // Math // Number Bases // Oh, No! It Crashed! // Registers // TI-BASIC to Asm Comparisons // TI86 Specifications // Two's Compliment // z80 Processor