1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-01 13:41:34 +00:00

Fix conflicts with some conio routines

This commit is contained in:
Karri Kaksonen 2022-04-05 10:35:59 +03:00
parent 4c7c3d8f2f
commit 6b16b99192
3 changed files with 18 additions and 13 deletions

View File

@ -52,6 +52,8 @@
/* No support for dynamically loadable drivers */ /* No support for dynamically loadable drivers */
#define DYN_DRV 0 #define DYN_DRV 0
extern unsigned char get_tv(void); /* get TV system */
#include <_tia.h> #include <_tia.h>
#define TIA (*(struct __tia*)0x0000) #define TIA (*(struct __tia*)0x0000)

View File

@ -10,7 +10,7 @@
.import _gotoxy, _gotox, _gotoy, tosaddax, tosumula0, pusha0 .import _gotoxy, _gotox, _gotoy, tosaddax, tosumula0, pusha0
.import pushax .import pushax
.import _screen .import _screen
.importzp ptr1 .importzp ptr3
.import CURS_X, CURS_Y .import CURS_X, CURS_Y
.include "atari7800.inc" .include "atari7800.inc"
@ -132,12 +132,12 @@ txtcolor:
lda #<(_screen) lda #<(_screen)
ldx #>(_screen) ldx #>(_screen)
jsr tosaddax jsr tosaddax
sta ptr1 sta ptr3
stx ptr1+1 stx ptr3+1
pla pla
ldy #0 ldy #0
sta (ptr1),y sta (ptr3),y
rts rts
.endproc .endproc

View File

@ -24,11 +24,11 @@
; ;
.export _setcursor .export _setcursor
.export _gotoxy, _gotox, _gotoy, wherex, wherey .export gotoxy, _gotoxy, _gotox, _gotoy, wherex, wherey
.export CURS_X, CURS_Y .export CURS_X, CURS_Y
.constructor init_cursor .constructor init_cursor
.importzp ptr1, sp .importzp ptr3, sp
.import _zones .import _zones
.import pusha, incsp1, pusha0, pushax, popax, tosumula0, incax5 .import pusha, incsp1, pusha0, pushax, popax, tosumula0, incax5
.include "atari7800.inc" .include "atari7800.inc"
@ -81,11 +81,11 @@ _cursorzone:
clc clc
adc #<_zones adc #<_zones
sta _cursorzone ; calculate new cursorzone sta _cursorzone ; calculate new cursorzone
sta ptr1 sta ptr3
txa txa
adc #>_zones adc #>_zones
sta _cursorzone+1 sta _cursorzone+1
sta ptr1+1 sta ptr3+1
rts rts
.endproc .endproc
@ -112,7 +112,7 @@ _cursorzone:
jsr calccursorzone jsr calccursorzone
ldy #1 ldy #1
lda #0 lda #0
sta (ptr1),y ; disable cursor sta (ptr3),y ; disable cursor
pla pla
sta CURS_Y sta CURS_Y
jsr calccursorzone jsr calccursorzone
@ -120,7 +120,7 @@ _cursorzone:
beq @L1 beq @L1
lda #30 ; enable cursor lda #30 ; enable cursor
@L1: ldy #1 @L1: ldy #1
sta (ptr1),y sta (ptr3),y
rts rts
.endproc .endproc
@ -136,15 +136,15 @@ _cursorzone:
tay tay
lda _cursorzone lda _cursorzone
ldx _cursorzone+1 ldx _cursorzone+1
sta ptr1 sta ptr3
stx ptr1+1 stx ptr3+1
tya tya
ldy #3 ldy #3
clc clc
rol rol
rol rol
rol rol
sta (ptr1),y sta (ptr3),y
rts rts
.endproc .endproc
@ -160,6 +160,9 @@ _cursorzone:
rts rts
.endproc .endproc
.proc gotoxy
jmp _gotoxy
.endproc
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
; Get cursor X position ; Get cursor X position
; ;