-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pickle
committed
Oct 13, 2023
1 parent
c28433a
commit bd6dbbb
Showing
19 changed files
with
940 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
DIRECTORY=$(cd `dirname $0` && pwd) | ||
|
||
cd x | ||
|
||
export MAINC="../hello.c" | ||
export OUT_NAME="testtex" | ||
|
||
export MAINC="main.c" | ||
export OUT_NAME=$2 | ||
|
||
sdasz80 -p -g -o tios_crt0.rel $DIRECTORY/other_files/tios_crt0.s | ||
|
||
docker run -v ${DIRECTORY}:/src/ z88dk/z88dk zcc +ti83p -subtype=asm -o $1/$OUT_NAME.bin $1/$MAINC | ||
cat <( echo -ne "\xbb\x6d" ) $1/$OUT_NAME.bin > $1/$OUT_NAME.bin2 | ||
|
||
sdcc -DSDCC --no-std-crt0 --code-loc 40347 --data-loc 0 --std-sdcc99 -mz80 --reserve-regs-iy -o $OUT_NAME.ihx tios_crt0.rel $MAINC | ||
cd $1 | ||
python $DIRECTORY/other_files/binpac8x.py $OUT_NAME.bin2 -O $OUT_NAME | ||
|
||
|
||
objcopy -Iihex -Obinary $OUT_NAME.ihx $OUT_NAME.bin | ||
python $DIRECTORY/other_files/binpac8x.py $OUT_NAME.bin -O $OUT_NAME | ||
|
||
rm $OUT_NAME.bin $OUT_NAME.ihx $OUT_NAME.lk $OUT_NAME.lst $OUT_NAME.map $OUT_NAME.noi $OUT_NAME.rel $OUT_NAME.sym tios_crt0.rel | ||
# rm $OUT_NAME.asm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# sh build_prog.sh examples/zcc_helloworld hllo | ||
sh build_app.sh examples/zcc_helloworld tix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0x82e3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#ifdef SDCC | ||
#define bcall(__LABEL__) rst 40 \ | ||
.dw __LABEL__ | ||
// A bit of trash data so the program runs correctly | ||
void _(){__asm ret | ||
.ascii "0000000000" __endasm;} | ||
|
||
#else | ||
#pragma string name teext | ||
#define bcall(__LABEL__) rst 40 \ defw __LABEL__ | ||
|
||
// A bit of trash data so the program runs correctly | ||
void _(){ | ||
#asm | ||
ret | ||
defm "0000000000" | ||
#endasm | ||
} | ||
#endif | ||
|
||
|
||
|
||
|
||
void main() | ||
{ | ||
|
||
#ifdef SDCC | ||
__asm | ||
#else | ||
#asm | ||
#endif | ||
bcall(0x4540 ) ; _ClrLCDFull | ||
|
||
xor a, a | ||
ld (0x86D7), a | ||
ld (0x86D8), a | ||
|
||
#ifdef SDCC | ||
ld a, #'!' | ||
#else | ||
ld a, '!' | ||
#endif | ||
|
||
push ix | ||
bcall(0x455E) ; _VPutMap | ||
pop ix | ||
|
||
|
||
bcall(0x4972 ) ; _getkey | ||
|
||
#ifdef SDCC | ||
__endasm; | ||
#else | ||
#endasm | ||
#endif | ||
|
||
|
||
|
||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.