I am writing my own custom OS for the monochrome TI-84+
I was originally gonna write it in only asm but after deleting everything by accident have been playing around with writing it using z88dk.
EDIT most of the community codes c for the ti84+ce so here is a link to help understand the ports better: [url] https://wikiti.brandonw.net/index.php?title=83Plus:Ports:10 [/url]
I have got it working and set up but for some reason this code doesn't give a black screen:
Code:
my crt:
Code:
and my Makefile
Code:
I was originally gonna write it in only asm but after deleting everything by accident have been playing around with writing it using z88dk.
EDIT most of the community codes c for the ti84+ce so here is a link to help understand the ports better: [url] https://wikiti.brandonw.net/index.php?title=83Plus:Ports:10 [/url]
I have got it working and set up but for some reason this code doesn't give a black screen:
Code:
__sfr __at 0x10 lcd_command;
__sfr __at 0x11 lcd_data;
int x,y;
void lcdDelay() __naked {
__asm
ex (sp),hl
ex (sp),hl
inc (hl)
dec (hl)
ret
__endasm;
}
void lcdSetXY( int x, int y) {
lcd_command = x + 0x80;
lcdDelay();
lcd_command = y + 0x20;
lcdDelay();
}
void bigDownLine() {
lcd_command = 0x80;
for (int i=0; i<64; i++) {
lcdDelay();
lcd_data = 0xff;
}
}
int main() {
lcd_command = 1;
lcdDelay();
lcd_command = 3;
lcdDelay();
lcd_command = 0x20;
lcdDelay();
lcd_command = 0x80;
lcdDelay();
lcd_command = 0xf0;
lcdDelay();
lcd_command = 0x40;
lcdDelay();
lcd_command = 5;
lcdDelay();
for (x=0; x<12; x++) {
lcdDelay();
lcd_command = 0x20 + x;
bigDownLine();
}
return 0;
}
my crt:
Code:
MODULE crt0
EXTERN _main
ORG 0
JR START
DS 0x38-2
RETI
DS 0x56-0x3A
DB 0x5a,0xa5
START:
LD SP,#0
CALL _main
INF:
JR INF
and my Makefile
Code:
PATH := $(PATH):$(HOME)/z88dk/bin
all:
zcc +sos -crt0=crt0.s main.c -o page00.bin
srec_cat page00.bin -binary -offset 0x0000 -o page00.ihx -intel
multihex 00 page00.ihx > os.hex
packxxu os.hex -o os84.8xu -t 83p -v 0.01 -h 255 -q 0A
rabbitsign -t 8xu -k 0A.key -K 0A -k ~/0A.key -g -p -P -r -f -v os84.8xu
clean:
rm *.o
rm *.asm


