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:

__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
What exactly happens when you do run this? You say it doesn't fill the screen with black, but does it display anything? What are you running it on? An emulator? If a real calculator, which model precisely?

Personally, I'd probably step through the code in Wabbitemu's debugger to investigate further if it's not managing to display anything.
It gives an 8 wide black line down from the start of the screen so I know ( or think I know ) that bigdownline works.
I have used tilem’s debugger. I have also been sending it to my ti84+ ( 1077002458L-0723AG ) and it does the same thing.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement