From 5f87dcea959ddc2ffea7e23176cc2f776a18d5aa Mon Sep 17 00:00:00 2001 From: izydorst Date: Sat, 27 Oct 2001 23:04:18 +0000 Subject: [PATCH] support for assert.h in GEOS, conio bugfixes git-svn-id: svn://svn.cc65.org/cc65/trunk@1094 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- doc/geos.sgml | 8 ++++---- libsrc/geos/common/Makefile | 2 +- libsrc/geos/common/_afailed.c | 31 +++++++++++++++++++++++++++++++ libsrc/geos/conio/cursor.inc | 1 - libsrc/geos/conio/kbhit.s | 1 - libsrc/geos/conio/where.s | 2 +- 6 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 libsrc/geos/common/_afailed.c diff --git a/doc/geos.sgml b/doc/geos.sgml index 8afc08c7d..a78290167 100644 --- a/doc/geos.sgml +++ b/doc/geos.sgml @@ -47,8 +47,8 @@ will not always return the same values. In fact -It is safe to use these standard includes: I am an assembler programmer and GEOSLib was designed in such way that cc65 could emit the best available code (well, the best as for machine :). Many of the -This one draws frame with given line pattern. +This one draws frame with given bit pattern (not a pattern from GEOS palette). InvertRectangle

@@ -273,7 +273,7 @@ number as set in Point Functions

diff --git a/libsrc/geos/common/Makefile b/libsrc/geos/common/Makefile index 8bea80e58..a7f9d5ddd 100644 --- a/libsrc/geos/common/Makefile +++ b/libsrc/geos/common/Makefile @@ -10,7 +10,7 @@ %.o: %.s @$(AS) -o $@ $(AFLAGS) $< -C_OBJS = abort.o perror.o +C_OBJS = _afailed.o abort.o perror.o S_OBJS = copydata.o memcpy.o memset.o rand.o all: $(C_OBJS) $(S_OBJS) diff --git a/libsrc/geos/common/_afailed.c b/libsrc/geos/common/_afailed.c new file mode 100644 index 000000000..1d42d5ba6 --- /dev/null +++ b/libsrc/geos/common/_afailed.c @@ -0,0 +1,31 @@ +/* + * _afailed.c + * + * Maciej 'YTM/Elysium' Witkowiak 28.10.2001 + */ + +#include +#include +#include + +void _afailed (char* file, unsigned line) +{ + + drawWindow.top = 0; + drawWindow.left = 0; + drawWindow.bot = 15; + drawWindow.right = 150; + dispBufferOn = ST_WR_FORE|ST_WR_BACK; + SetPattern(0); + Rectangle(); + FrameRectangle(0xff); + + PutString(CBOLDON "file: ", 10, 10); + PutString(file, 10, r11); + PutString(CBOLDON " line: ", 10, r11); + PutDecimal(0, line, 10, r11); + + DlgBoxOk(CBOLDON "ASSERTION FAILED", "PROGRAM TERMINATED" CPLAINTEXT); + + exit (2); +} diff --git a/libsrc/geos/conio/cursor.inc b/libsrc/geos/conio/cursor.inc index 88c61a835..178c859bb 100644 --- a/libsrc/geos/conio/cursor.inc +++ b/libsrc/geos/conio/cursor.inc @@ -4,7 +4,6 @@ ; ; 27.10.2001 -SCREEN_PTR = $D1 ; Pointer to current char in text screen cursor_x = $D3 ; Cursor column (word) cursor_y = $D5 ; Cursor row cursor_flag = $D6 ; cursor on/off (0-off) diff --git a/libsrc/geos/conio/kbhit.s b/libsrc/geos/conio/kbhit.s index 4f065cdfe..5786d0aee 100644 --- a/libsrc/geos/conio/kbhit.s +++ b/libsrc/geos/conio/kbhit.s @@ -9,7 +9,6 @@ .export _kbhit .import return0, return1 - .include "../inc/jumptab.inc" .include "../inc/geossym.inc" _kbhit: diff --git a/libsrc/geos/conio/where.s b/libsrc/geos/conio/where.s index 3c5767954..8ba44e94e 100644 --- a/libsrc/geos/conio/where.s +++ b/libsrc/geos/conio/where.s @@ -17,7 +17,7 @@ _wherex: lda cursor_x sta tmp1 lda cursor_x+1 sta tmp2 - lda #tmp1 + ldx #tmp1 ldy #3 jsr DShiftRight lda tmp1