mirror of
https://github.com/cc65/cc65.git
synced 2025-02-25 16:29:08 +00:00
support for assert.h in GEOS, conio bugfixes
git-svn-id: svn://svn.cc65.org/cc65/trunk@1094 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
8ce6c9bcac
commit
5f87dcea95
@ -47,8 +47,8 @@ will not always return the same values. In fact <tt/gotoxy/ sets current positio
|
|||||||
you would expect on a normal 40x25 screen, not a position that would regard current font's
|
you would expect on a normal 40x25 screen, not a position that would regard current font's
|
||||||
height. Both 40 and 80 columns modes are supported.
|
height. Both 40 and 80 columns modes are supported.
|
||||||
<p>
|
<p>
|
||||||
It is safe to use these standard includes: <tt/conio.h, dio.h, errno.h, geos.h, joystick.h,
|
It is safe to use these standard includes and its contents:
|
||||||
mouse.h, stdlib.h, string.h/
|
<tt/assert.h, conio.h, dio.h, errno.h, geos.h, joystick.h, mouse.h, stdlib.h, string.h/
|
||||||
<p>
|
<p>
|
||||||
I am an assembler programmer and GEOSLib was designed in such way that cc65 could emit the best
|
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 <tt/void foo (void)/ functions are
|
available code (well, the best as for machine :). Many of the <tt/void foo (void)/ functions are
|
||||||
@ -217,7 +217,7 @@ This draws on screen rectangle filled with current pattern.
|
|||||||
<p>
|
<p>
|
||||||
<tt/void FrameRectangle (char pattern)/
|
<tt/void FrameRectangle (char pattern)/
|
||||||
<p>
|
<p>
|
||||||
This one draws frame with given line pattern.
|
This one draws frame with given bit pattern (not a pattern from GEOS palette).
|
||||||
|
|
||||||
<sect3>InvertRectangle
|
<sect3>InvertRectangle
|
||||||
<p>
|
<p>
|
||||||
@ -273,7 +273,7 @@ number as set in <tt/SetPattern/ but a true bit pattern.
|
|||||||
<tt/void DrawLine (struct window *myWindow)/
|
<tt/void DrawLine (struct window *myWindow)/
|
||||||
<p>
|
<p>
|
||||||
<tt/top/ parameters of <tt/struct window/ describe the starting point of the line, while
|
<tt/top/ parameters of <tt/struct window/ describe the starting point of the line, while
|
||||||
<tt/bottom/ are for the ending point. Current pattern is used for drawing.
|
<tt/bottom/ are for the ending point. Current pattern from <tt/SetPattern/ is used for drawing.
|
||||||
|
|
||||||
<sect2>Point Functions
|
<sect2>Point Functions
|
||||||
<p>
|
<p>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
%.o: %.s
|
%.o: %.s
|
||||||
@$(AS) -o $@ $(AFLAGS) $<
|
@$(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
|
S_OBJS = copydata.o memcpy.o memset.o rand.o
|
||||||
|
|
||||||
all: $(C_OBJS) $(S_OBJS)
|
all: $(C_OBJS) $(S_OBJS)
|
||||||
|
31
libsrc/geos/common/_afailed.c
Normal file
31
libsrc/geos/common/_afailed.c
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* _afailed.c
|
||||||
|
*
|
||||||
|
* Maciej 'YTM/Elysium' Witkowiak 28.10.2001
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <geos.h>
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
@ -4,7 +4,6 @@
|
|||||||
;
|
;
|
||||||
; 27.10.2001
|
; 27.10.2001
|
||||||
|
|
||||||
SCREEN_PTR = $D1 ; Pointer to current char in text screen
|
|
||||||
cursor_x = $D3 ; Cursor column (word)
|
cursor_x = $D3 ; Cursor column (word)
|
||||||
cursor_y = $D5 ; Cursor row
|
cursor_y = $D5 ; Cursor row
|
||||||
cursor_flag = $D6 ; cursor on/off (0-off)
|
cursor_flag = $D6 ; cursor on/off (0-off)
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
.export _kbhit
|
.export _kbhit
|
||||||
.import return0, return1
|
.import return0, return1
|
||||||
|
|
||||||
.include "../inc/jumptab.inc"
|
|
||||||
.include "../inc/geossym.inc"
|
.include "../inc/geossym.inc"
|
||||||
|
|
||||||
_kbhit:
|
_kbhit:
|
||||||
|
@ -17,7 +17,7 @@ _wherex: lda cursor_x
|
|||||||
sta tmp1
|
sta tmp1
|
||||||
lda cursor_x+1
|
lda cursor_x+1
|
||||||
sta tmp2
|
sta tmp2
|
||||||
lda #tmp1
|
ldx #tmp1
|
||||||
ldy #3
|
ldy #3
|
||||||
jsr DShiftRight
|
jsr DShiftRight
|
||||||
lda tmp1
|
lda tmp1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user