1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00
cc65/libsrc/sym1/display.s

142 lines
2.6 KiB
ArmAsm
Raw Normal View History

;
2021-06-06 21:28:03 -05:00
; Wayne Parham (wayne@parhamdata.com)
;
2021-06-06 21:28:03 -05:00
; int fdisp (void);
; void set_D0 (char segments);
; int get_D0 (void);
; void set_D1 (char segments);
; int get_D1 (void);
; void set_D2 (char segments);
; int get_D2 (void);
; void set_D3 (char segments);
; int get_D3 (void);
; void set_D4 (char segments);
; int get_D4 (void);
; void set_D5 (char segments);
; int get_D5 (void);
; void set_D6 (char segments);
; int get_D6 (void);
;
.include "sym1.inc"
.export _fdisp, _set_D0, _get_D0
.export _set_D1, _get_D1, _set_D2, _get_D2
.export _set_D3, _get_D3, _set_D4, _get_D4
.export _set_D5, _get_D5, _set_D6, _get_D6
.segment "CODE"
.proc _fdisp: near
2021-06-06 21:28:03 -05:00
jsr SCAND ; Flash Display
2021-06-06 21:28:03 -05:00
rts
2021-06-06 21:28:03 -05:00
.endproc
.proc _set_D0: near
2021-06-06 21:28:03 -05:00
sta DISBUF0 ; Write Digit 0
2021-06-06 21:28:03 -05:00
rts
.endproc
.proc _get_D0: near
2021-06-06 21:28:03 -05:00
lda DISBUF0 ; Read Digit 0
2021-06-07 00:03:44 -05:00
ldx #>$0000 ;
rts ; Return DISBUF0
2021-06-06 21:28:03 -05:00
.endproc
.proc _set_D1: near
2021-06-06 21:28:03 -05:00
sta DISBUF1 ; Write Digit 1
2021-06-06 21:28:03 -05:00
rts
.endproc
.proc _get_D1: near
2021-06-06 21:28:03 -05:00
lda DISBUF1 ; Read Digit 1
2021-06-07 00:03:44 -05:00
ldx #>$0000 ;
2021-06-06 21:28:03 -05:00
rts
2021-06-06 21:28:03 -05:00
.endproc
.proc _set_D2: near
2021-06-06 21:28:03 -05:00
sta DISBUF2 ; Write Digit 2
2021-06-06 21:28:03 -05:00
rts
.endproc
.proc _get_D2: near
2021-06-06 21:28:03 -05:00
lda DISBUF2 ; Read Digit 2
2021-06-07 00:03:44 -05:00
ldx #>$0000 ;
rts ; Return DISBUF2
2021-06-06 21:28:03 -05:00
.endproc
.proc _set_D3: near
2021-06-06 21:28:03 -05:00
sta DISBUF3 ; Write Digit 3
2021-06-06 21:28:03 -05:00
rts
.endproc
.proc _get_D3: near
2021-06-06 21:28:03 -05:00
lda DISBUF3 ; Read Digit 3
2021-06-07 00:03:44 -05:00
ldx #>$0000 ;
rts ; Return DISBUF3
2021-06-06 21:28:03 -05:00
.endproc
.proc _set_D4: near
2021-06-06 21:28:03 -05:00
sta DISBUF4 ; Write Digit 4
2021-06-06 21:28:03 -05:00
rts
.endproc
.proc _get_D4: near
2021-06-06 21:28:03 -05:00
lda DISBUF4 ; Read Digit 4
2021-06-07 00:03:44 -05:00
ldx #>$0000 ;
rts ; Return DISBUF4
2021-06-06 21:28:03 -05:00
.endproc
.proc _set_D5: near
2021-06-06 21:28:03 -05:00
sta DISBUF5 ; Write Digit 5
2021-06-06 21:28:03 -05:00
rts
.endproc
.proc _get_D5: near
2021-06-06 21:28:03 -05:00
lda DISBUF5 ; Read Digit 5
2021-06-07 00:03:44 -05:00
ldx #>$0000 ;
rts ; Return DISBUF5
2021-06-06 21:28:03 -05:00
.endproc
.proc _set_D6: near
2021-06-06 21:28:03 -05:00
sta DISBUF6 ; Write byte to the right of display
2021-06-06 21:28:03 -05:00
rts
.endproc
.proc _get_D6: near
2021-06-06 21:28:03 -05:00
lda DISBUF6 ; Read byte to the right of display
2021-06-07 00:03:44 -05:00
ldx #>$0000 ;
rts ; Return DISBUF6
2021-06-06 21:28:03 -05:00
.endproc