diff options
author | B. Watson <yalhcru@gmail.com> | 2016-02-29 05:42:13 -0500 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2016-02-29 05:42:13 -0500 |
commit | 3cbd137bfaa17bfabbe988c9760b315f865378ca (patch) | |
tree | e0a5092abb84aaa96ff3ff886789616ca3ddafa5 /console.s | |
parent | be6706ab0b2df53bc1cc9e8492a84698e1fd0f1c (diff) | |
download | taipan-3cbd137bfaa17bfabbe988c9760b315f865378ca.tar.gz |
8051 bytes free, we can now run with BASIC present (only 40K required)
Diffstat (limited to 'console.s')
-rw-r--r-- | console.s | 64 |
1 files changed, 62 insertions, 2 deletions
@@ -1,7 +1,7 @@ .include "atari.inc" - .export _clrtobot, _clrtoeol, _clr_screen, _clrtoline, _cspaces, _cblank, _backspace, _cprint_pipe, _cprint_bang, _cspace, _cputc_s, _comma_space, _cprint_colon_space, _cprint_question_space, _cprint_period, _cprint_taipan_prompt, _crlf + .export _clrtobot, _clrtoeol, _clr_screen, _clrtoline, _cspaces, _cblank, _backspace, _cprint_pipe, _cprint_bang, _cspace, _cputc_s, _comma_space, _cprint_colon_space, _cprint_question_space, _cprint_period, _cprint_taipan_prompt, _crlf, _plus_or_space, _gotox0y, _cputc0, _set_orders .export _rvs_on, _rvs_off .import mul40 ; from cc65's runtime @@ -10,7 +10,7 @@ .import bump_destptr ; these two are .importzp destptr ; from draw_lorcha.s .importzp sreg - .import _cprintulong, _cputc, _cprint_taipan + .import _cprintulong, _cputc, _cprint_taipan, _timed_getch, _orders .ifdef CART_TARGET .segment "HIGHCODE" @@ -195,6 +195,9 @@ _comma_space: _cspace: lda #' ' .byte $2c +_cputc0: + lda #'0' + .byte $2c _cprint_pipe: lda #'|' .byte $2c @@ -210,3 +213,60 @@ _cprint_bang: _crlf: lda #$9b jmp _cputc + +; extern void plus_or_space(unsigned char b); +_plus_or_space: + tax + beq @spc + lda #'+' + 128 ; inverse plus + .byte $2c +@spc: + lda #' ' + ldx #39 + stx COLCRS + lda #15 + stx ROWCRS + jmp _cputc + +; extern void gotox0y(char y); + _gotox0y: + sta ROWCRS + lda #0 + sta COLCRS + rts + +; extern void set_orders(void); +;_set_orders: +; jsr _timed_getch +; ldx _orders +; cmp #'f' +; bne @notf +; ldx #1 +;@notf: +; cmp #'r' +; bne @notr +; ldx #2 +;@notr: +; cmp #'t' +; bne @nott +; ldx #3 +;@nott: +; stx _orders +; rts + +; extern void set_orders(void); +_set_orders: + jsr _timed_getch + ldx #3 +@solp: + cmp orders_tbl-1,x + beq @returnx + dex + bne @solp + rts +@returnx: + stx _orders + rts + + .rodata +orders_tbl: .byte "frt" |