From: izydorst Date: Thu, 17 Apr 2003 11:45:53 +0000 (+0000) Subject: removed some duplicated GEOS conio stuff X-Git-Tag: V2.12.0~1631 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=04e4ecc319ddbe10117c655090b94ccc6d4a492a;p=cc65 removed some duplicated GEOS conio stuff git-svn-id: svn://svn.cc65.org/cc65/trunk@2064 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/Makefile b/libsrc/Makefile index b571a8515..285dd91f3 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -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) \ diff --git a/libsrc/geos/conio/_scrsize.s b/libsrc/geos/conio/_scrsize.s index 847b94803..29616c86f 100644 --- a/libsrc/geos/conio/_scrsize.s +++ b/libsrc/geos/conio/_scrsize.s @@ -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 diff --git a/libsrc/geos/conio/cputhex.s b/libsrc/geos/conio/cputhex.s deleted file mode 100644 index 1aaeed6b2..000000000 --- a/libsrc/geos/conio/cputhex.s +++ /dev/null @@ -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 - - - - - - - diff --git a/libsrc/geos/conio/cputs.s b/libsrc/geos/conio/cputs.s deleted file mode 100644 index a05f2bad7..000000000 --- a/libsrc/geos/conio/cputs.s +++ /dev/null @@ -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 - - diff --git a/libsrc/geos/conio/screensize.s b/libsrc/geos/conio/screensize.s deleted file mode 100644 index 00524c1b8..000000000 --- a/libsrc/geos/conio/screensize.s +++ /dev/null @@ -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