mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 17:30:50 +00:00
removed some duplicated GEOS conio stuff
git-svn-id: svn://svn.cc65.org/cc65/trunk@2064 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
c7bcd948a8
commit
04e4ecc319
@ -192,7 +192,7 @@ geoslib:
|
||||
AFLAGS="-t geos -I../../../asminc" \
|
||||
CFLAGS="-Osir -g -T -t geos -I../../../include" \
|
||||
$(MAKE) -C geos || exit 1
|
||||
for i in em joystick tgi common runtime; do \
|
||||
for i in em joystick tgi conio common runtime; do \
|
||||
CC=$(CC) \
|
||||
AS=$(AS) \
|
||||
LD=$(LD) \
|
||||
|
@ -4,12 +4,13 @@
|
||||
;
|
||||
; Screen size variables
|
||||
;
|
||||
; 6.3.2001
|
||||
; 6.3.2001, 17.4.2003
|
||||
|
||||
|
||||
.include "../inc/geossym.inc"
|
||||
|
||||
.export xsize, ysize
|
||||
.export screensize
|
||||
.importzp cursor_r, cursor_c
|
||||
.import _cursor
|
||||
.constructor initscrsize
|
||||
@ -32,6 +33,11 @@ L1: lda #40 ; 40 columns (more or less)
|
||||
txa
|
||||
jmp _cursor ; home and update cursor
|
||||
|
||||
screensize:
|
||||
ldx xsize
|
||||
ldy ysize
|
||||
rts
|
||||
|
||||
.bss
|
||||
|
||||
xsize: .res 1
|
||||
|
@ -1,39 +0,0 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 08.08.1998
|
||||
;
|
||||
; void cputhex8 (unsigned char val);
|
||||
; void cputhex16 (unsigned val);
|
||||
;
|
||||
|
||||
.export _cputhex8, _cputhex16
|
||||
.import _cputc
|
||||
.import __hextab
|
||||
|
||||
|
||||
_cputhex16:
|
||||
pha ; Save low byte
|
||||
txa ; Get high byte into A
|
||||
jsr _cputhex8 ; Output high byte
|
||||
pla ; Restore low byte and run into _cputhex8
|
||||
|
||||
_cputhex8:
|
||||
pha ; Save the value
|
||||
lsr a
|
||||
lsr a
|
||||
lsr a
|
||||
lsr a
|
||||
tay
|
||||
lda __hextab,y
|
||||
jsr _cputc
|
||||
pla
|
||||
and #$0F
|
||||
tay
|
||||
lda __hextab,y
|
||||
jmp _cputc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 06.08.1998
|
||||
;
|
||||
; void cputsxy (unsigned char x, unsigned char y, char* s);
|
||||
; void cputs (char* s);
|
||||
;
|
||||
|
||||
.export _cputsxy, _cputs
|
||||
.import popa, _gotoxy, _cputc
|
||||
.importzp ptr1, tmp1
|
||||
|
||||
_cputsxy:
|
||||
sta ptr1 ; Save s for later
|
||||
stx ptr1+1
|
||||
jsr popa ; Get Y
|
||||
jsr _gotoxy ; Set cursor, pop x
|
||||
jmp L0 ; Same as cputs...
|
||||
|
||||
_cputs: sta ptr1 ; Save s
|
||||
stx ptr1+1
|
||||
L0: ldy #0
|
||||
L1: lda (ptr1),y
|
||||
beq L9 ; Jump if done
|
||||
iny
|
||||
sty tmp1 ; Save offset
|
||||
jsr _cputc ; Output char, advance cursor
|
||||
ldy tmp1 ; Get offset
|
||||
bne L1 ; Next char
|
||||
inc ptr1+1 ; Bump high byte
|
||||
bne L1
|
||||
|
||||
; Done
|
||||
|
||||
L9: rts
|
||||
|
||||
|
@ -1,32 +0,0 @@
|
||||
|
||||
;
|
||||
; Maciej 'YTM/Elysium' Witkowiak
|
||||
;
|
||||
; 27.10.2001
|
||||
; 06.03.2002
|
||||
|
||||
; void screensize (unsigned char* x, unsigned char* y);
|
||||
;
|
||||
|
||||
.export _screensize
|
||||
|
||||
.import popax
|
||||
.importzp ptr1, ptr2
|
||||
.import xsize, ysize
|
||||
|
||||
.include "../inc/geossym.inc"
|
||||
|
||||
_screensize:
|
||||
|
||||
sta ptr1 ; Store the y pointer
|
||||
stx ptr1+1
|
||||
|
||||
jsr popax ; get the x pointer
|
||||
sta ptr2
|
||||
stx ptr2+1
|
||||
|
||||
lda xsize
|
||||
sta (ptr2),y
|
||||
lda ysize
|
||||
sta (ptr1),y
|
||||
rts
|
Loading…
x
Reference in New Issue
Block a user