Make ion progs in C.
Moderator: MaxCoderz Staff
Make ion progs in C.
How do I compile working ion compatible progs in C?
I'm using this:
zcc +ti8xansi -startup=1 -o name.bin name.c (using with devpac8x)
and it doesn't make ion programs.
if it can't, then is their a ti-os to ion program program? -.-
I'm using this:
zcc +ti8xansi -startup=1 -o name.bin name.c (using with devpac8x)
and it doesn't make ion programs.
if it can't, then is their a ti-os to ion program program? -.-
Last edited by cjgone on Mon 03 Mar, 2008 12:39 am, edited 2 times in total.
I think ti83p_crt0 is right...
err...
and ions header is:
Now what? :[ Could you plz convert bottom ion header to something I could use? ty.
err...
Code: Select all
;-----------------
;1 - Ion (default)
;-----------------
IF !NOT_DEFAULT_SHELL
DEFINE Ion
org $9D95
;org $9D93
;defb $BB,$6D
ret
jr nc,start
DEFINE NEED_name
INCLUDE "zcc_opt.def"
UNDEFINE NEED_name
IF !DEFINED_NEED_name
defm "Z88DK Small C+ Program"
ENDIF
defb $0
ENDIF
Code: Select all
.nolist ;\
#include "ion.inc" ; \
.list ; \
#ifdef TI83P ; \
.org progstart-2 ; | Standard Ion
.db $BB,$6D ; / Program Header
#else ; /
.org progstart ; /
#endif ;/
ret ; use xor a if libraries are not used
jr nc,start ; jump to the start
; of the program
- tr1p1ea
- Maxcoderz Staff
- Posts: 4141
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: I cant seem to get out of this cryogenic chamber!
- Contact:
Strange, compiling like that works fine for me, at least this program shows up as Ion, changing startup to 2 makes it MOS:
Code: Select all
#pragma string name Hello World
#pragma data icon 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00;
#include <stdio.h>
main() {
// print string
printf("Hello World!");
// wait for keypress
while( getk() == 0 ) {
}
}
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
I don't think it's possible to use any memory banking other than $4000-$7FFF without screwing up TIOS's interrupt handler or romcalls.
But on a TI83+SE or TI84+ series you can have "Ram APPS", 16k of code running from a RAM bank, mapped into $4000-$7FFF. However, you need to write your program to run from that origin, and any data passed to a romcall must be in a different page. At that point, you're better off just making an app.
But on a TI83+SE or TI84+ series you can have "Ram APPS", 16k of code running from a RAM bank, mapped into $4000-$7FFF. However, you need to write your program to run from that origin, and any data passed to a romcall must be in a different page. At that point, you're better off just making an app.
You know your hexadecimal output routine is broken when it displays the character 'G'.
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
It would be a decidedly odd thing to do of course, and how would you even get the ram app in place? (not in any normal way, that's for sure)
But, what I would really like to know: can you run code from $C000 - $FFFF if you swap in an executable rampage? (the odd numbers (as opposed to even)) (through "the other memory mode" or port5?)
It would kill the TIOS for sure, but is it at all possible?
But, what I would really like to know: can you run code from $C000 - $FFFF if you swap in an executable rampage? (the odd numbers (as opposed to even)) (through "the other memory mode" or port5?)
It would kill the TIOS for sure, but is it at all possible?
I remember Jim e or tr1p1ea posting about this once so I think it's possible.King Harold wrote:It would be a decidedly odd thing to do of course, and how would you even get the ram app in place? (not in any normal way, that's for sure)
But, what I would really like to know: can you run code from $C000 - $FFFF if you swap in an executable rampage? (the odd numbers (as opposed to even)) (through "the other memory mode" or port5?)
It would kill the TIOS for sure, but is it at all possible?