Mercurial > hg > Members > kono > nitros9-code
changeset 2952:9306e2875040
coyota: Port to lwtools
It builds fine, but testing it on Vcc fails badly.
Note I had to omit the forced 8-bit offset on line 115
leax <selfnt,pcr
and I don't know why this offset got larger than before.
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Sun, 09 Feb 2014 21:39:25 +0100 |
parents | 63fb45a6007b |
children | 8450cdb44df7 |
files | 3rdparty/packages/coyota/bin_dec32.as 3rdparty/packages/coyota/coyota.as 3rdparty/packages/coyota/dashboard.as 3rdparty/packages/coyota/instrument.as 3rdparty/packages/coyota/makefile |
diffstat | 5 files changed, 37 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/3rdparty/packages/coyota/bin_dec32.as Sun Feb 09 21:06:29 2014 +0100 +++ b/3rdparty/packages/coyota/bin_dec32.as Sun Feb 09 21:39:25 2014 +0100 @@ -15,8 +15,9 @@ ttl Assembler Library Module - psect BIN_DEC32,0,0,0,0,0 +BIN_DEC32 EXPORT + SECTION code Base fcb $3B,$9A,$CA,$00 1,000,000,000 fcb $05,$F5,$E1,$00 100,000,000 @@ -110,4 +111,4 @@ std ,x rts - endsect + ENDSECT
--- a/3rdparty/packages/coyota/coyota.as Sun Feb 09 21:06:29 2014 +0100 +++ b/3rdparty/packages/coyota/coyota.as Sun Feb 09 21:39:25 2014 +0100 @@ -1,20 +1,28 @@ **************************************************************************** * -* coyota.a - main coyota application +* coyota.as - main coyota application * * - psect coyota_a,$01,$81,1,200,coyota + use os9.d + SECTION __os9 +TYPE EQU $11 +ATTR EQU $80 +REVS EQU $01 +EDITION EQU $01 +STACK EQU 200 + ENDSECT - vsect + SECTION bss orgopt rmb 32 curopt rmb 32 - endsect + ENDSECT * Sleep Duration NAPTIME equ 6 + SECTION code * byte stream to send to window to make a 320x192 16 color gfx screen type6 fdb WDWEnd @@ -33,11 +41,14 @@ stdfonts fcc "SYS/stdfonts" fcb C$CR + ENDSECT - vsect + SECTION bss ch rmb 1 readbuf rmb $2000 - endsect + ENDSECT + + SECTION code * Intercept routine exit @@ -58,6 +69,7 @@ * main entry point +__start coyota: * install intercept routine leax <intercept,pcr @@ -100,7 +112,7 @@ bra rl close lda ,s+ os9 I$Close - leax <selfnt,pcr + leax selfnt,pcr ldy #selfntL lda #$01 os9 I$Write @@ -140,4 +152,4 @@ * EXIT: all registers (except cc) preserved - endsect + ENDSECT
--- a/3rdparty/packages/coyota/dashboard.as Sun Feb 09 21:06:29 2014 +0100 +++ b/3rdparty/packages/coyota/dashboard.as Sun Feb 09 21:39:25 2014 +0100 @@ -4,11 +4,9 @@ * * - psect dashboard_a,0,0,0,200,0 - - vsect + SECTION bss numbuf rmb 24 - endsect + ENDSECT white equ $00 @@ -25,6 +23,8 @@ insfill equ cyan txtclr equ $03 green + SECTION code + * byte stream to send to window to make dashboard dash fdb WScaleSw @@ -267,4 +267,4 @@ lbsr PUTS rts - endsect + ENDSECT
--- a/3rdparty/packages/coyota/instrument.as Sun Feb 09 21:06:29 2014 +0100 +++ b/3rdparty/packages/coyota/instrument.as Sun Feb 09 21:39:25 2014 +0100 @@ -4,15 +4,15 @@ * * - psect instrument_a,0,0,3,0,0 - - vsect + SECTION bss speed rmb 2 mileage rmb 4 engtemp rmb 2 fuelamt rmb 2 - endsect + ENDSECT + SECTION code + * initialize hardware * * Entry: None @@ -82,4 +82,4 @@ rts - endsect + ENDSECT
--- a/3rdparty/packages/coyota/makefile Sun Feb 09 21:06:29 2014 +0100 +++ b/3rdparty/packages/coyota/makefile Sun Feb 09 21:39:25 2014 +0100 @@ -1,10 +1,10 @@ include $(NITROS9DIR)/rules.mak TARGET = coyota -LFLAGS += -y -l=$(NITROS9DIR)/3rdparty/libs/alib/alib.l -RFILES = coyota.r instrument.r dashboard.r bin_dec32.r +OBJS = coyota.o instrument.o dashboard.o bin_dec32.o +LFLAGS += -lalib -lnos96809l2 -L$(NOSLIB) -$(TARGET): $(RFILES) +$(TARGET): $(OBJS) clean: - $(RM) $(RFILES) $(TARGET) + $(RM) $(OBJS) $(TARGET)