Removed (pretty inconsistently used) tab chars from source code base.
This commit is contained in:
@@ -15,8 +15,8 @@ void __fastcall__ _poserror (const char* msg)
|
||||
|
||||
ExitTurbo();
|
||||
if (msg && *msg) {
|
||||
DlgBoxOk(msg, errmsg);
|
||||
DlgBoxOk(msg, errmsg);
|
||||
} else {
|
||||
DlgBoxOk("", errmsg);
|
||||
DlgBoxOk("", errmsg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,25 +4,25 @@
|
||||
; Copy the data segment from the LOAD to the RUN location
|
||||
;
|
||||
|
||||
.export copydata
|
||||
.import __DATA_LOAD__, __DATA_RUN__, __DATA_SIZE__
|
||||
.export copydata
|
||||
.import __DATA_LOAD__, __DATA_RUN__, __DATA_SIZE__
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
copydata:
|
||||
lda #<__DATA_SIZE__ ; no need to check if it is == 0
|
||||
ldx #>__DATA_SIZE__
|
||||
sta r2L
|
||||
stx r2H
|
||||
lda #<__DATA_SIZE__ ; no need to check if it is == 0
|
||||
ldx #>__DATA_SIZE__
|
||||
sta r2L
|
||||
stx r2H
|
||||
|
||||
lda #<__DATA_RUN__
|
||||
ldx #>__DATA_RUN__
|
||||
sta r1L
|
||||
stx r1H
|
||||
lda #<__DATA_RUN__
|
||||
ldx #>__DATA_RUN__
|
||||
sta r1L
|
||||
stx r1H
|
||||
|
||||
lda #<__DATA_LOAD__
|
||||
ldx #>__DATA_LOAD__
|
||||
sta r0L
|
||||
stx r0H
|
||||
jmp MoveData
|
||||
lda #<__DATA_LOAD__
|
||||
ldx #>__DATA_LOAD__
|
||||
sta r0L
|
||||
stx r0H
|
||||
jmp MoveData
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
; Maciej 'YTM/Elysium' Witkowiak, 15.07.2001
|
||||
;
|
||||
|
||||
.export _memcpy
|
||||
.import _MoveData
|
||||
.export _memcpy
|
||||
.import _MoveData
|
||||
|
||||
_memcpy = _MoveData
|
||||
_memcpy = _MoveData
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
; Maciej 'YTM/Elysium' Witkowiak, 15.07.2001
|
||||
;
|
||||
|
||||
.export _memmove
|
||||
.import _MoveData
|
||||
.export _memmove
|
||||
.import _MoveData
|
||||
|
||||
_memmove = _MoveData
|
||||
_memmove = _MoveData
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
; Maciej 'YTM/Elysium' Witkowiak, 20.08.2003
|
||||
;
|
||||
|
||||
.export _memset, _bzero, __bzero
|
||||
.import _ClearRam, _FillRam
|
||||
.export _memset, _bzero, __bzero
|
||||
.import _ClearRam, _FillRam
|
||||
|
||||
_bzero = _ClearRam
|
||||
__bzero = _ClearRam
|
||||
_memset = _FillRam
|
||||
_bzero = _ClearRam
|
||||
__bzero = _ClearRam
|
||||
_memset = _FillRam
|
||||
|
||||
@@ -15,8 +15,8 @@ void __fastcall__ perror(const char* msg)
|
||||
|
||||
ExitTurbo();
|
||||
if (msg && *msg) {
|
||||
DlgBoxOk(msg, errmsg);
|
||||
DlgBoxOk(msg, errmsg);
|
||||
} else {
|
||||
DlgBoxOk("", errmsg);
|
||||
DlgBoxOk("", errmsg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,9 +12,9 @@ unsigned __fastcall__ sleep (unsigned wait)
|
||||
char typ;
|
||||
|
||||
if ( (get_tv()) & TV_NTSC ) {
|
||||
typ = 60;
|
||||
typ = 60;
|
||||
} else {
|
||||
typ = 50;
|
||||
typ = 50;
|
||||
}
|
||||
|
||||
Sleep(wait*typ);
|
||||
|
||||
@@ -5,19 +5,19 @@
|
||||
; Zero the bss segment.
|
||||
;
|
||||
|
||||
.export zerobss
|
||||
.import __BSS_RUN__, __BSS_SIZE__
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.export zerobss
|
||||
.import __BSS_RUN__, __BSS_SIZE__
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
zerobss:
|
||||
lda #<__BSS_SIZE__
|
||||
ldx #>__BSS_SIZE__
|
||||
sta r0L
|
||||
stx r0H
|
||||
lda #<__BSS_RUN__
|
||||
ldx #>__BSS_RUN__
|
||||
sta r1L
|
||||
stx r1H
|
||||
jmp ClearRam
|
||||
lda #<__BSS_SIZE__
|
||||
ldx #>__BSS_SIZE__
|
||||
sta r0L
|
||||
stx r0H
|
||||
lda #<__BSS_RUN__
|
||||
ldx #>__BSS_RUN__
|
||||
sta r1L
|
||||
stx r1H
|
||||
jmp ClearRam
|
||||
|
||||
@@ -6,46 +6,46 @@
|
||||
; 6.3.2001, 17.4.2003
|
||||
|
||||
|
||||
.export xsize, ysize
|
||||
.export screensize
|
||||
.importzp cursor_r, cursor_c
|
||||
.import _cursor
|
||||
.constructor initscrsize
|
||||
|
||||
.include "geossym.inc"
|
||||
.export xsize, ysize
|
||||
.export screensize
|
||||
.importzp cursor_r, cursor_c
|
||||
.import _cursor
|
||||
.constructor initscrsize
|
||||
|
||||
.include "geossym.inc"
|
||||
|
||||
.segment "INIT"
|
||||
.segment "INIT"
|
||||
|
||||
initscrsize:
|
||||
.ifdef __GEOS_CBM__
|
||||
lda graphMode
|
||||
bpl L1
|
||||
lda #80 ; 80 columns (more or less)
|
||||
.byte $2c
|
||||
L1: lda #40 ; 40 columns (more or less)
|
||||
sta xsize
|
||||
lda #25 ; something like that for Y size
|
||||
lda graphMode
|
||||
bpl L1
|
||||
lda #80 ; 80 columns (more or less)
|
||||
.byte $2c
|
||||
L1: lda #40 ; 40 columns (more or less)
|
||||
sta xsize
|
||||
lda #25 ; something like that for Y size
|
||||
.else
|
||||
lda #70 ; 70 columns (more or less)
|
||||
sta xsize
|
||||
lda #24 ; something like that for Y size
|
||||
lda #70 ; 70 columns (more or less)
|
||||
sta xsize
|
||||
lda #24 ; something like that for Y size
|
||||
.endif
|
||||
sta ysize
|
||||
lda #0
|
||||
sta cursor_c
|
||||
sta cursor_r
|
||||
jmp _cursor ; home and update cursor
|
||||
sta ysize
|
||||
lda #0
|
||||
sta cursor_c
|
||||
sta cursor_r
|
||||
jmp _cursor ; home and update cursor
|
||||
|
||||
.code
|
||||
|
||||
screensize:
|
||||
ldx xsize
|
||||
ldy ysize
|
||||
rts
|
||||
ldx xsize
|
||||
ldy ysize
|
||||
rts
|
||||
|
||||
.bss
|
||||
|
||||
xsize:
|
||||
.res 1
|
||||
.res 1
|
||||
ysize:
|
||||
.res 1
|
||||
.res 1
|
||||
|
||||
@@ -6,53 +6,53 @@
|
||||
; void cclearxy (unsigned char x, unsigned char y, unsigned char length);
|
||||
; void cclear (unsigned char length);
|
||||
|
||||
.export _cclearxy, _cclear
|
||||
.import popa, _gotoxy, fixcursor
|
||||
.importzp cursor_x, cursor_y, cursor_c
|
||||
.export _cclearxy, _cclear
|
||||
.import popa, _gotoxy, fixcursor
|
||||
.importzp cursor_x, cursor_y, cursor_c
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_cclearxy:
|
||||
pha ; Save the length
|
||||
jsr popa ; Get y
|
||||
jsr _gotoxy ; Call this one, will pop params
|
||||
pla ; Restore the length
|
||||
pha ; Save the length
|
||||
jsr popa ; Get y
|
||||
jsr _gotoxy ; Call this one, will pop params
|
||||
pla ; Restore the length
|
||||
|
||||
_cclear:
|
||||
cmp #0 ; Is the length zero?
|
||||
beq L9 ; Jump if done
|
||||
tax
|
||||
lda cursor_x ; left start
|
||||
sta r3L
|
||||
lda cursor_x+1
|
||||
sta r3L+1
|
||||
lda cursor_y ; level
|
||||
sta r2L
|
||||
clc
|
||||
adc #7
|
||||
sta r2H
|
||||
txa ; right end
|
||||
clc
|
||||
adc cursor_c
|
||||
sta cursor_c
|
||||
sta r4L
|
||||
ldx #r4
|
||||
ldy #3
|
||||
jsr DShiftLeft
|
||||
clc ; one pixel less
|
||||
lda r4L
|
||||
sbc #0
|
||||
sta r4L
|
||||
lda r4L+1
|
||||
sbc #0
|
||||
sta r4L+1
|
||||
lda curPattern ; store current pattern
|
||||
pha
|
||||
lda #0 ; set pattern to clear
|
||||
jsr SetPattern
|
||||
jsr Rectangle
|
||||
pla
|
||||
jsr SetPattern ; restore pattern
|
||||
jsr fixcursor
|
||||
L9: rts
|
||||
cmp #0 ; Is the length zero?
|
||||
beq L9 ; Jump if done
|
||||
tax
|
||||
lda cursor_x ; left start
|
||||
sta r3L
|
||||
lda cursor_x+1
|
||||
sta r3L+1
|
||||
lda cursor_y ; level
|
||||
sta r2L
|
||||
clc
|
||||
adc #7
|
||||
sta r2H
|
||||
txa ; right end
|
||||
clc
|
||||
adc cursor_c
|
||||
sta cursor_c
|
||||
sta r4L
|
||||
ldx #r4
|
||||
ldy #3
|
||||
jsr DShiftLeft
|
||||
clc ; one pixel less
|
||||
lda r4L
|
||||
sbc #0
|
||||
sta r4L
|
||||
lda r4L+1
|
||||
sbc #0
|
||||
sta r4L+1
|
||||
lda curPattern ; store current pattern
|
||||
pha
|
||||
lda #0 ; set pattern to clear
|
||||
jsr SetPattern
|
||||
jsr Rectangle
|
||||
pla
|
||||
jsr SetPattern ; restore pattern
|
||||
jsr fixcursor
|
||||
L9: rts
|
||||
|
||||
@@ -6,34 +6,34 @@
|
||||
|
||||
; unsigned char cgetc (void);
|
||||
|
||||
.export _cgetc
|
||||
.import cursor, _PromptOff
|
||||
.importzp cursor_x, cursor_y
|
||||
.export _cgetc
|
||||
.import cursor, _PromptOff
|
||||
.importzp cursor_x, cursor_y
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_cgetc:
|
||||
; show cursor if needed
|
||||
lda cursor
|
||||
beq L0
|
||||
lda cursor
|
||||
beq L0
|
||||
|
||||
; prepare cursor
|
||||
lda #7
|
||||
jsr InitTextPrompt
|
||||
lda cursor_x
|
||||
ldx cursor_x+1
|
||||
sta stringX
|
||||
stx stringX+1
|
||||
lda cursor_y
|
||||
sta stringY
|
||||
jsr PromptOn
|
||||
lda #7
|
||||
jsr InitTextPrompt
|
||||
lda cursor_x
|
||||
ldx cursor_x+1
|
||||
sta stringX
|
||||
stx stringX+1
|
||||
lda cursor_y
|
||||
sta stringY
|
||||
jsr PromptOn
|
||||
|
||||
L0: jsr GetNextChar
|
||||
tax
|
||||
beq L0
|
||||
pha
|
||||
jsr _PromptOff
|
||||
pla
|
||||
ldx #0
|
||||
rts
|
||||
L0: jsr GetNextChar
|
||||
tax
|
||||
beq L0
|
||||
pha
|
||||
jsr _PromptOff
|
||||
pla
|
||||
ldx #0
|
||||
rts
|
||||
|
||||
@@ -6,49 +6,49 @@
|
||||
; void chlinexy (unsigned char x, unsigned char y, unsigned char length);
|
||||
; void chline (unsigned char length);
|
||||
|
||||
.export _chlinexy, _chline
|
||||
.import popa, _gotoxy, fixcursor
|
||||
.importzp cursor_x, cursor_y, cursor_c
|
||||
.export _chlinexy, _chline
|
||||
.import popa, _gotoxy, fixcursor
|
||||
.importzp cursor_x, cursor_y, cursor_c
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_chlinexy:
|
||||
pha ; Save the length
|
||||
jsr popa ; Get y
|
||||
jsr _gotoxy ; Call this one, will pop params
|
||||
pla ; Restore the length
|
||||
pha ; Save the length
|
||||
jsr popa ; Get y
|
||||
jsr _gotoxy ; Call this one, will pop params
|
||||
pla ; Restore the length
|
||||
|
||||
_chline:
|
||||
cmp #0 ; Is the length zero?
|
||||
beq L9 ; Jump if done
|
||||
tax
|
||||
lda cursor_x ; left start
|
||||
sta r3L
|
||||
lda cursor_x+1
|
||||
sta r3L+1
|
||||
lda cursor_y ; level
|
||||
clc
|
||||
adc #4 ; in the middle of a cell
|
||||
sta r11L
|
||||
txa ; right end
|
||||
clc
|
||||
adc cursor_c
|
||||
sta cursor_c
|
||||
sta r4L
|
||||
lda #0
|
||||
sta r4L+1
|
||||
ldx #r4
|
||||
ldy #3
|
||||
jsr DShiftLeft
|
||||
clc ; one pixel less
|
||||
lda r4L
|
||||
sbc #0
|
||||
sta r4L
|
||||
lda r4L+1
|
||||
sbc #0
|
||||
sta r4L+1
|
||||
lda #%11111111 ; pattern
|
||||
jsr HorizontalLine
|
||||
jsr fixcursor
|
||||
L9: rts
|
||||
cmp #0 ; Is the length zero?
|
||||
beq L9 ; Jump if done
|
||||
tax
|
||||
lda cursor_x ; left start
|
||||
sta r3L
|
||||
lda cursor_x+1
|
||||
sta r3L+1
|
||||
lda cursor_y ; level
|
||||
clc
|
||||
adc #4 ; in the middle of a cell
|
||||
sta r11L
|
||||
txa ; right end
|
||||
clc
|
||||
adc cursor_c
|
||||
sta cursor_c
|
||||
sta r4L
|
||||
lda #0
|
||||
sta r4L+1
|
||||
ldx #r4
|
||||
ldy #3
|
||||
jsr DShiftLeft
|
||||
clc ; one pixel less
|
||||
lda r4L
|
||||
sbc #0
|
||||
sta r4L
|
||||
lda r4L+1
|
||||
sbc #0
|
||||
sta r4L+1
|
||||
lda #%11111111 ; pattern
|
||||
jsr HorizontalLine
|
||||
jsr fixcursor
|
||||
L9: rts
|
||||
|
||||
@@ -5,45 +5,45 @@
|
||||
|
||||
; void clrscr (void);
|
||||
|
||||
.export _clrscr
|
||||
.import fixcursor
|
||||
.importzp cursor_c, cursor_r
|
||||
.export _clrscr
|
||||
.import fixcursor
|
||||
.importzp cursor_c, cursor_r
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
|
||||
_clrscr:
|
||||
lda curPattern ; save current pattern
|
||||
pha
|
||||
lda #0 ; set pattern to clear
|
||||
jsr SetPattern
|
||||
ldx #0
|
||||
stx r3L
|
||||
stx r3H
|
||||
stx r2L
|
||||
stx cursor_c
|
||||
stx cursor_r
|
||||
jsr fixcursor ; home cursor
|
||||
lda curPattern ; save current pattern
|
||||
pha
|
||||
lda #0 ; set pattern to clear
|
||||
jsr SetPattern
|
||||
ldx #0
|
||||
stx r3L
|
||||
stx r3H
|
||||
stx r2L
|
||||
stx cursor_c
|
||||
stx cursor_r
|
||||
jsr fixcursor ; home cursor
|
||||
.ifdef __GEOS_CBM__
|
||||
lda #199
|
||||
sta r2H
|
||||
lda graphMode
|
||||
bpl L40
|
||||
lda #>639 ; 80 columns
|
||||
ldx #<639
|
||||
bne L99
|
||||
L40: lda #>319 ; 40 columns
|
||||
ldx #<319
|
||||
lda #199
|
||||
sta r2H
|
||||
lda graphMode
|
||||
bpl L40
|
||||
lda #>639 ; 80 columns
|
||||
ldx #<639
|
||||
bne L99
|
||||
L40: lda #>319 ; 40 columns
|
||||
ldx #<319
|
||||
L99:
|
||||
.else
|
||||
lda #191
|
||||
sta r2H
|
||||
lda #>559
|
||||
ldx #<559
|
||||
lda #191
|
||||
sta r2H
|
||||
lda #>559
|
||||
ldx #<559
|
||||
.endif
|
||||
sta r4H
|
||||
stx r4L
|
||||
jsr Rectangle
|
||||
pla
|
||||
jmp SetPattern ; restore pattern
|
||||
sta r4H
|
||||
stx r4L
|
||||
jsr Rectangle
|
||||
pla
|
||||
jmp SetPattern ; restore pattern
|
||||
|
||||
@@ -22,70 +22,70 @@
|
||||
; HOME = KEY_ENTER, KEY_HOME = REV_ON,
|
||||
; UPLINE = ?, KEY_UPARROW = GOTOY, ...
|
||||
|
||||
.export _cputcxy, _cputc
|
||||
.import _gotoxy, fixcursor
|
||||
.import popa
|
||||
.import xsize,ysize
|
||||
.importzp cursor_x, cursor_y, cursor_c, cursor_r
|
||||
.export _cputcxy, _cputc
|
||||
.import _gotoxy, fixcursor
|
||||
.import popa
|
||||
.import xsize,ysize
|
||||
.importzp cursor_x, cursor_y, cursor_c, cursor_r
|
||||
|
||||
.include "const.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "const.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_cputcxy:
|
||||
pha ; Save C
|
||||
jsr popa ; Get Y
|
||||
jsr _gotoxy ; Set cursor, drop x
|
||||
pla ; Restore C
|
||||
pha ; Save C
|
||||
jsr popa ; Get Y
|
||||
jsr _gotoxy ; Set cursor, drop x
|
||||
pla ; Restore C
|
||||
|
||||
; Plot a character - also used as internal function
|
||||
|
||||
_cputc:
|
||||
tax ; save character
|
||||
tax ; save character
|
||||
; some characters 0-31 are not safe for PutChar
|
||||
cmp #$20
|
||||
bcs L1
|
||||
cmp #CR
|
||||
beq do_cr
|
||||
cmp #LF
|
||||
beq do_lf
|
||||
cmp #KEY_DELETE
|
||||
bne L0
|
||||
ldx #BACKSPACE
|
||||
sec
|
||||
bcs L2
|
||||
L0: rts
|
||||
cmp #$20
|
||||
bcs L1
|
||||
cmp #CR
|
||||
beq do_cr
|
||||
cmp #LF
|
||||
beq do_lf
|
||||
cmp #KEY_DELETE
|
||||
bne L0
|
||||
ldx #BACKSPACE
|
||||
sec
|
||||
bcs L2
|
||||
L0: rts
|
||||
|
||||
L1: clc
|
||||
L2: php
|
||||
lda cursor_x
|
||||
sta r11L
|
||||
lda cursor_x+1
|
||||
sta r11H
|
||||
lda cursor_y
|
||||
clc
|
||||
adc #6 ; 6 pixels down to the baseline
|
||||
sta r1H
|
||||
txa
|
||||
jsr PutChar
|
||||
plp
|
||||
bcs fix_cursor
|
||||
L1: clc
|
||||
L2: php
|
||||
lda cursor_x
|
||||
sta r11L
|
||||
lda cursor_x+1
|
||||
sta r11H
|
||||
lda cursor_y
|
||||
clc
|
||||
adc #6 ; 6 pixels down to the baseline
|
||||
sta r1H
|
||||
txa
|
||||
jsr PutChar
|
||||
plp
|
||||
bcs fix_cursor
|
||||
|
||||
inc cursor_c
|
||||
lda cursor_c
|
||||
cmp xsize ; hit right margin?
|
||||
bne fix_cursor
|
||||
lda #0 ; yes - do cr+lf
|
||||
sta cursor_c
|
||||
do_lf: inc cursor_r
|
||||
lda cursor_r
|
||||
cmp ysize ; hit bottom margin?
|
||||
bne fix_cursor
|
||||
dec cursor_r ; yes - stay in the last line
|
||||
inc cursor_c
|
||||
lda cursor_c
|
||||
cmp xsize ; hit right margin?
|
||||
bne fix_cursor
|
||||
lda #0 ; yes - do cr+lf
|
||||
sta cursor_c
|
||||
do_lf: inc cursor_r
|
||||
lda cursor_r
|
||||
cmp ysize ; hit bottom margin?
|
||||
bne fix_cursor
|
||||
dec cursor_r ; yes - stay in the last line
|
||||
|
||||
fix_cursor:
|
||||
jmp fixcursor
|
||||
jmp fixcursor
|
||||
|
||||
do_cr: lda #0
|
||||
sta cursor_c
|
||||
beq fix_cursor
|
||||
do_cr: lda #0
|
||||
sta cursor_c
|
||||
beq fix_cursor
|
||||
|
||||
@@ -6,43 +6,43 @@
|
||||
; void cvlinexy (unsigned char x, unsigned char y, unsigned char length);
|
||||
; void cvline (unsigned char length);
|
||||
|
||||
.export _cvlinexy, _cvline
|
||||
.import popa, _gotoxy, fixcursor
|
||||
.importzp cursor_x, cursor_y, cursor_r
|
||||
.export _cvlinexy, _cvline
|
||||
.import popa, _gotoxy, fixcursor
|
||||
.importzp cursor_x, cursor_y, cursor_r
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_cvlinexy:
|
||||
pha ; Save the length
|
||||
jsr popa ; Get y
|
||||
jsr _gotoxy ; Call this one, will pop params
|
||||
pla ; Restore the length
|
||||
pha ; Save the length
|
||||
jsr popa ; Get y
|
||||
jsr _gotoxy ; Call this one, will pop params
|
||||
pla ; Restore the length
|
||||
|
||||
_cvline:
|
||||
cmp #0 ; Is the length zero?
|
||||
beq L9 ; Jump if done
|
||||
tax
|
||||
lda cursor_x ; x position
|
||||
clc
|
||||
adc #3 ; in the middle of cell
|
||||
sta r4L
|
||||
lda cursor_x+1
|
||||
adc #0
|
||||
sta r4L+1
|
||||
lda cursor_y ; top start
|
||||
sta r3L
|
||||
txa ; bottom end
|
||||
clc
|
||||
adc cursor_r
|
||||
sta cursor_r
|
||||
asl a
|
||||
asl a
|
||||
asl a
|
||||
clc ; one pixel less
|
||||
sbc #0
|
||||
sta r3H
|
||||
lda #%11111111 ; pattern
|
||||
jsr VerticalLine
|
||||
jsr fixcursor
|
||||
L9: rts
|
||||
cmp #0 ; Is the length zero?
|
||||
beq L9 ; Jump if done
|
||||
tax
|
||||
lda cursor_x ; x position
|
||||
clc
|
||||
adc #3 ; in the middle of cell
|
||||
sta r4L
|
||||
lda cursor_x+1
|
||||
adc #0
|
||||
sta r4L+1
|
||||
lda cursor_y ; top start
|
||||
sta r3L
|
||||
txa ; bottom end
|
||||
clc
|
||||
adc cursor_r
|
||||
sta cursor_r
|
||||
asl a
|
||||
asl a
|
||||
asl a
|
||||
clc ; one pixel less
|
||||
sbc #0
|
||||
sta r3H
|
||||
lda #%11111111 ; pattern
|
||||
jsr VerticalLine
|
||||
jsr fixcursor
|
||||
L9: rts
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
; unsigned char __fastcall__ revers (unsigned char onoff);
|
||||
;
|
||||
|
||||
.export _textcolor, _bgcolor, _bordercolor, _revers
|
||||
.import return0
|
||||
.export _textcolor, _bgcolor, _bordercolor, _revers
|
||||
.import return0
|
||||
|
||||
_textcolor = return0
|
||||
_bgcolor = return0
|
||||
_bordercolor = return0
|
||||
_revers = return0
|
||||
_textcolor = return0
|
||||
_bgcolor = return0
|
||||
_bordercolor = return0
|
||||
_revers = return0
|
||||
|
||||
@@ -8,37 +8,37 @@
|
||||
; void gotoy (unsigned char y);
|
||||
; void gotoxy (unsigned char x, unsigned char y);
|
||||
|
||||
.export _gotox, _gotoy, _gotoxy, fixcursor
|
||||
.import popa
|
||||
.importzp cursor_x, cursor_y, cursor_c, cursor_r
|
||||
.export _gotox, _gotoy, _gotoxy, fixcursor
|
||||
.import popa
|
||||
.importzp cursor_x, cursor_y, cursor_c, cursor_r
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_gotox:
|
||||
sta cursor_c
|
||||
jmp fixcursor
|
||||
sta cursor_c
|
||||
jmp fixcursor
|
||||
|
||||
_gotoy:
|
||||
sta cursor_r
|
||||
jmp fixcursor
|
||||
sta cursor_r
|
||||
jmp fixcursor
|
||||
|
||||
_gotoxy:
|
||||
sta cursor_r
|
||||
jsr popa
|
||||
sta cursor_c
|
||||
sta cursor_r
|
||||
jsr popa
|
||||
sta cursor_c
|
||||
|
||||
; convert 8x8 x/y coordinates to GEOS hires
|
||||
fixcursor:
|
||||
lda cursor_c
|
||||
sta cursor_x
|
||||
lda #0
|
||||
sta cursor_x+1
|
||||
ldx #cursor_x
|
||||
ldy #3
|
||||
jsr DShiftLeft
|
||||
lda cursor_r
|
||||
asl a
|
||||
asl a
|
||||
asl a
|
||||
sta cursor_y
|
||||
rts
|
||||
lda cursor_c
|
||||
sta cursor_x
|
||||
lda #0
|
||||
sta cursor_x+1
|
||||
ldx #cursor_x
|
||||
ldy #3
|
||||
jsr DShiftLeft
|
||||
lda cursor_r
|
||||
asl a
|
||||
asl a
|
||||
asl a
|
||||
sta cursor_y
|
||||
rts
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
|
||||
; unsigned char kbhit (void);
|
||||
|
||||
.export _kbhit
|
||||
.export _kbhit
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_kbhit:
|
||||
ldx #0 ; High byte of result
|
||||
lda pressFlag
|
||||
rol ; Bit 7 is new key flag
|
||||
txa ; A = 0
|
||||
rol
|
||||
rts
|
||||
ldx #0 ; High byte of result
|
||||
lda pressFlag
|
||||
rol ; Bit 7 is new key flag
|
||||
txa ; A = 0
|
||||
rol
|
||||
rts
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
; unsigned char wherex (void);
|
||||
; unsigned char wherey (void);
|
||||
|
||||
.export _wherex, _wherey
|
||||
.importzp cursor_c, cursor_r
|
||||
.export _wherex, _wherey
|
||||
.importzp cursor_c, cursor_r
|
||||
|
||||
_wherex:
|
||||
lda cursor_c
|
||||
ldx #0
|
||||
rts
|
||||
lda cursor_c
|
||||
ldx #0
|
||||
rts
|
||||
|
||||
_wherey:
|
||||
lda cursor_r
|
||||
ldx #0
|
||||
rts
|
||||
lda cursor_r
|
||||
ldx #0
|
||||
rts
|
||||
|
||||
@@ -3,439 +3,439 @@
|
||||
;reassembled by Maciej 'YTM/Elysium' Witkowiak
|
||||
;4-2-99, 18-3-99
|
||||
|
||||
NULL = 0
|
||||
FALSE = NULL
|
||||
TRUE = $ff
|
||||
NULL = 0
|
||||
FALSE = NULL
|
||||
TRUE = $ff
|
||||
|
||||
MOUSE_SPRNUM = 0
|
||||
MOUSE_SPRNUM = 0
|
||||
|
||||
DISK_DRV_LGH = $0d80
|
||||
DISK_DRV_LGH = $0d80
|
||||
|
||||
;
|
||||
;filetypes
|
||||
; GEOS
|
||||
NOT_GEOS = 0
|
||||
BASIC = 1
|
||||
ASSEMBLY = 2
|
||||
DATA = 3
|
||||
SYSTEM = 4
|
||||
DESK_ACC = 5
|
||||
APPLICATION = 6
|
||||
APPL_DATA = 7
|
||||
FONT = 8
|
||||
PRINTER = 9
|
||||
INPUT_DEVICE = 10
|
||||
DISK_DEVICE = 11
|
||||
SYSTEM_BOOT = 12
|
||||
TEMPORARY = 13
|
||||
AUTO_EXEC = 14
|
||||
INPUT_128 = 15
|
||||
NUMFILETYPES = 16
|
||||
; structure
|
||||
SEQUENTIAL = 0
|
||||
VLIR = 1
|
||||
; DOS
|
||||
DEL = 0
|
||||
SEQ = 1
|
||||
PRG = 2
|
||||
USR = 3
|
||||
REL = 4
|
||||
CBM = 5
|
||||
; GEOS
|
||||
NOT_GEOS = 0
|
||||
BASIC = 1
|
||||
ASSEMBLY = 2
|
||||
DATA = 3
|
||||
SYSTEM = 4
|
||||
DESK_ACC = 5
|
||||
APPLICATION = 6
|
||||
APPL_DATA = 7
|
||||
FONT = 8
|
||||
PRINTER = 9
|
||||
INPUT_DEVICE = 10
|
||||
DISK_DEVICE = 11
|
||||
SYSTEM_BOOT = 12
|
||||
TEMPORARY = 13
|
||||
AUTO_EXEC = 14
|
||||
INPUT_128 = 15
|
||||
NUMFILETYPES = 16
|
||||
; structure
|
||||
SEQUENTIAL = 0
|
||||
VLIR = 1
|
||||
; DOS
|
||||
DEL = 0
|
||||
SEQ = 1
|
||||
PRG = 2
|
||||
USR = 3
|
||||
REL = 4
|
||||
CBM = 5
|
||||
|
||||
;drivetypes
|
||||
DRV_NULL = 0
|
||||
DRV_1541 = 1
|
||||
DRV_1571 = 2
|
||||
DRV_1581 = 3
|
||||
DRV_NETWORK = 15
|
||||
DRV_NULL = 0
|
||||
DRV_1541 = 1
|
||||
DRV_1571 = 2
|
||||
DRV_1581 = 3
|
||||
DRV_NETWORK = 15
|
||||
|
||||
;various disk
|
||||
REL_FILE_NUM = 9
|
||||
CMND_FILE_NUM = 15
|
||||
MAX_CMND_STR = 32
|
||||
DIR_1581_TRACK = 40
|
||||
DIR_ACC_CHAN = 13
|
||||
DIR_TRACK = 18
|
||||
N_TRACKS = 35
|
||||
DK_NM_ID_LEN = 18
|
||||
TRACK = 9
|
||||
SECTOR = 12
|
||||
TOTAL_BLOCKS = 664
|
||||
REL_FILE_NUM = 9
|
||||
CMND_FILE_NUM = 15
|
||||
MAX_CMND_STR = 32
|
||||
DIR_1581_TRACK = 40
|
||||
DIR_ACC_CHAN = 13
|
||||
DIR_TRACK = 18
|
||||
N_TRACKS = 35
|
||||
DK_NM_ID_LEN = 18
|
||||
TRACK = 9
|
||||
SECTOR = 12
|
||||
TOTAL_BLOCKS = 664
|
||||
|
||||
;colours
|
||||
BLACK = 0
|
||||
WHITE = 1
|
||||
RED = 2
|
||||
CYAN = 3
|
||||
PURPLE = 4
|
||||
GREEN = 5
|
||||
BLUE = 6
|
||||
YELLOW = 7
|
||||
ORANGE = 8
|
||||
BROWN = 9
|
||||
LTRED = 10
|
||||
DKGREY = 11
|
||||
GREY = 12
|
||||
MEDGREY = 12
|
||||
LTGREEN = 13
|
||||
LTBLUE = 14
|
||||
LTGREY = 15
|
||||
BLACK = 0
|
||||
WHITE = 1
|
||||
RED = 2
|
||||
CYAN = 3
|
||||
PURPLE = 4
|
||||
GREEN = 5
|
||||
BLUE = 6
|
||||
YELLOW = 7
|
||||
ORANGE = 8
|
||||
BROWN = 9
|
||||
LTRED = 10
|
||||
DKGREY = 11
|
||||
GREY = 12
|
||||
MEDGREY = 12
|
||||
LTGREEN = 13
|
||||
LTBLUE = 14
|
||||
LTGREY = 15
|
||||
|
||||
;vic memory banks
|
||||
GRBANK0 = %11
|
||||
GRBANK1 = %10
|
||||
GRBANK2 = %01
|
||||
GRBANK3 = %00
|
||||
GRBANK0 = %11
|
||||
GRBANK1 = %10
|
||||
GRBANK2 = %01
|
||||
GRBANK3 = %00
|
||||
|
||||
;screen
|
||||
VIC_X_POS_OFF = 24
|
||||
VIC_Y_POS_OFF = 50
|
||||
SC_BYTE_WIDTH = 40
|
||||
VIC_X_POS_OFF = 24
|
||||
VIC_Y_POS_OFF = 50
|
||||
SC_BYTE_WIDTH = 40
|
||||
.ifdef __GEOS_CBM__
|
||||
SC_PIX_HEIGHT = 200
|
||||
SC_PIX_WIDTH = 320
|
||||
SC_PIX_HEIGHT = 200
|
||||
SC_PIX_WIDTH = 320
|
||||
.else
|
||||
SC_PIX_HEIGHT = 192
|
||||
SC_PIX_WIDTH = 560
|
||||
SC_PIX_HEIGHT = 192
|
||||
SC_PIX_WIDTH = 560
|
||||
.endif
|
||||
SC_SIZE = 8000
|
||||
SC_SIZE = 8000
|
||||
;128 screen size constants
|
||||
SCREENBYTEWIDTH = 80
|
||||
SCREENPIXELWIDTH = 640
|
||||
SCREENBYTEWIDTH = 80
|
||||
SCREENPIXELWIDTH = 640
|
||||
|
||||
|
||||
;control characters
|
||||
EOF = 0
|
||||
BACKSPACE = 8
|
||||
FORWARDSPACE = 9
|
||||
TAB = 9
|
||||
LF = 10
|
||||
HOME = 11
|
||||
PAGE_BREAK = 12
|
||||
UPLINE = 12
|
||||
CR = 13
|
||||
ULINEON = 14
|
||||
ULINEOFF = 15
|
||||
ESC_GRAPHICS = 16
|
||||
ESC_RULER = 17
|
||||
REV_ON = 18
|
||||
REV_OFF = 19
|
||||
GOTOX = 20
|
||||
GOTOY = 21
|
||||
GOTOXY = 22
|
||||
NEWCARDSET = 23
|
||||
BOLDON = 24
|
||||
ITALICON = 25
|
||||
OUTLINEON = 26
|
||||
PLAINTEXT = 27
|
||||
EOF = 0
|
||||
BACKSPACE = 8
|
||||
FORWARDSPACE = 9
|
||||
TAB = 9
|
||||
LF = 10
|
||||
HOME = 11
|
||||
PAGE_BREAK = 12
|
||||
UPLINE = 12
|
||||
CR = 13
|
||||
ULINEON = 14
|
||||
ULINEOFF = 15
|
||||
ESC_GRAPHICS = 16
|
||||
ESC_RULER = 17
|
||||
REV_ON = 18
|
||||
REV_OFF = 19
|
||||
GOTOX = 20
|
||||
GOTOY = 21
|
||||
GOTOXY = 22
|
||||
NEWCARDSET = 23
|
||||
BOLDON = 24
|
||||
ITALICON = 25
|
||||
OUTLINEON = 26
|
||||
PLAINTEXT = 27
|
||||
|
||||
;keyboard
|
||||
KEY_F1 = 1
|
||||
KEY_F2 = 2
|
||||
KEY_F3 = 3
|
||||
KEY_F4 = 4
|
||||
KEY_F5 = 5
|
||||
KEY_F6 = 6
|
||||
KEY_NOSCRL = 7
|
||||
KEY_ENTER = 11
|
||||
KEY_F7 = 14
|
||||
KEY_F8 = 15
|
||||
KEY_UP = 16
|
||||
KEY_DOWN = 17
|
||||
KEY_HOME = 18
|
||||
KEY_CLEAR = 19
|
||||
KEY_LARROW = 20
|
||||
KEY_UPARROR = 21
|
||||
KEY_STOP = 22
|
||||
KEY_RUN = 23
|
||||
KEY_BPS = 24
|
||||
KEY_HELP = 25
|
||||
KEY_ALT = 26
|
||||
KEY_ESC = 27
|
||||
KEY_INSERT = 28
|
||||
KEY_DELETE = 29
|
||||
KEY_RIGHT = 30
|
||||
KEY_INVALID = 31
|
||||
KEY_LEFT = BACKSPACE
|
||||
KEY_F1 = 1
|
||||
KEY_F2 = 2
|
||||
KEY_F3 = 3
|
||||
KEY_F4 = 4
|
||||
KEY_F5 = 5
|
||||
KEY_F6 = 6
|
||||
KEY_NOSCRL = 7
|
||||
KEY_ENTER = 11
|
||||
KEY_F7 = 14
|
||||
KEY_F8 = 15
|
||||
KEY_UP = 16
|
||||
KEY_DOWN = 17
|
||||
KEY_HOME = 18
|
||||
KEY_CLEAR = 19
|
||||
KEY_LARROW = 20
|
||||
KEY_UPARROR = 21
|
||||
KEY_STOP = 22
|
||||
KEY_RUN = 23
|
||||
KEY_BPS = 24
|
||||
KEY_HELP = 25
|
||||
KEY_ALT = 26
|
||||
KEY_ESC = 27
|
||||
KEY_INSERT = 28
|
||||
KEY_DELETE = 29
|
||||
KEY_RIGHT = 30
|
||||
KEY_INVALID = 31
|
||||
KEY_LEFT = BACKSPACE
|
||||
|
||||
;DialogBox
|
||||
; icons
|
||||
OK = 1
|
||||
CANCEL = 2
|
||||
YES = 3
|
||||
NO = 4
|
||||
OPEN = 5
|
||||
DISK = 6
|
||||
; commands
|
||||
DBTXTSTR = 11
|
||||
DBVARSTR = 12
|
||||
DBGETSTRING = 13
|
||||
DBSYSOPV = 14
|
||||
DBGRPHSTR = 15
|
||||
DBGETFILES = 16
|
||||
DBOPVEC = 17
|
||||
DBUSRICON = 18
|
||||
DB_USR_ROUT = 19
|
||||
; tabulation in standard window
|
||||
DBI_X_0 = 1
|
||||
DBI_X_1 = 9
|
||||
DBI_X_2 = 17
|
||||
DBI_Y_0 = 8
|
||||
DBI_Y_1 = 40
|
||||
DBI_Y_2 = 72
|
||||
; standard window
|
||||
SET_DB_POS = 0
|
||||
DEF_DB_POS = $80
|
||||
DEF_DB_TOP = 32
|
||||
DEF_DB_BOT = 127
|
||||
DEF_DB_LEFT = 64
|
||||
DEF_DB_RIGHT = 255
|
||||
; text tabulation
|
||||
TXT_LN_1_Y = 16
|
||||
TXT_LN_2_Y = 32
|
||||
TXT_LN_3_Y = 48
|
||||
TXT_LN_4_Y = 64
|
||||
TXT_LN_5_Y = 80
|
||||
TXT_LN_X = 16
|
||||
; ???
|
||||
SYSDBI_HEIGHT = 16
|
||||
SYSDBI_WIDTH = 6
|
||||
; icons
|
||||
OK = 1
|
||||
CANCEL = 2
|
||||
YES = 3
|
||||
NO = 4
|
||||
OPEN = 5
|
||||
DISK = 6
|
||||
; commands
|
||||
DBTXTSTR = 11
|
||||
DBVARSTR = 12
|
||||
DBGETSTRING = 13
|
||||
DBSYSOPV = 14
|
||||
DBGRPHSTR = 15
|
||||
DBGETFILES = 16
|
||||
DBOPVEC = 17
|
||||
DBUSRICON = 18
|
||||
DB_USR_ROUT = 19
|
||||
; tabulation in standard window
|
||||
DBI_X_0 = 1
|
||||
DBI_X_1 = 9
|
||||
DBI_X_2 = 17
|
||||
DBI_Y_0 = 8
|
||||
DBI_Y_1 = 40
|
||||
DBI_Y_2 = 72
|
||||
; standard window
|
||||
SET_DB_POS = 0
|
||||
DEF_DB_POS = $80
|
||||
DEF_DB_TOP = 32
|
||||
DEF_DB_BOT = 127
|
||||
DEF_DB_LEFT = 64
|
||||
DEF_DB_RIGHT = 255
|
||||
; text tabulation
|
||||
TXT_LN_1_Y = 16
|
||||
TXT_LN_2_Y = 32
|
||||
TXT_LN_3_Y = 48
|
||||
TXT_LN_4_Y = 64
|
||||
TXT_LN_5_Y = 80
|
||||
TXT_LN_X = 16
|
||||
; ???
|
||||
SYSDBI_HEIGHT = 16
|
||||
SYSDBI_WIDTH = 6
|
||||
|
||||
;GraphicsString - commands
|
||||
MOVEPENTO = 1
|
||||
LINETO = 2
|
||||
RECTANGLETO = 3
|
||||
NEWPATTERN = 5
|
||||
ESC_PUTSTRING = 6
|
||||
FRAME_RECTO = 7
|
||||
PEN_X_DELTA = 8
|
||||
PEN_Y_DELTA = 9
|
||||
PEN_XY_DELTA = 10
|
||||
MOVEPENTO = 1
|
||||
LINETO = 2
|
||||
RECTANGLETO = 3
|
||||
NEWPATTERN = 5
|
||||
ESC_PUTSTRING = 6
|
||||
FRAME_RECTO = 7
|
||||
PEN_X_DELTA = 8
|
||||
PEN_Y_DELTA = 9
|
||||
PEN_XY_DELTA = 10
|
||||
|
||||
|
||||
;DoMenu - menutypes
|
||||
MENU_ACTION = $00
|
||||
DYN_SUB_MENU = $40
|
||||
SUB_MENU = $80
|
||||
HORIZONTAL = %00000000
|
||||
VERTICAL = %10000000
|
||||
MENU_ACTION = $00
|
||||
DYN_SUB_MENU = $40
|
||||
SUB_MENU = $80
|
||||
HORIZONTAL = %00000000
|
||||
VERTICAL = %10000000
|
||||
|
||||
;Errors
|
||||
ANY_FAULT = %11110000
|
||||
NO_BLOCKS = 1
|
||||
INV_TRACK = 2
|
||||
INSUFF_SPACE = 3
|
||||
FULL_DIRECTORY = 4
|
||||
FILE_NOT_FOUND = 5
|
||||
BAD_BAM = 6
|
||||
UNOPENED_VLIR = 7
|
||||
INV_RECORD = 8
|
||||
OUT_OF_RECORDS = 9
|
||||
STRUCT_MISMAT = 10
|
||||
BFR_OVERFLOW = 11
|
||||
CANCEL_ERR = 12
|
||||
DEV_NOT_FOUND = 13
|
||||
INCOMPATIBLE = 14
|
||||
HDR_NOT_THERE = $20
|
||||
NO_SYNC = $21
|
||||
DBLK_NOT_THERE = $22
|
||||
DAT_CHKSUM_ERR = $23
|
||||
WR_VER_ERR = $25
|
||||
WR_PR_ON = $26
|
||||
HDR_CHKSUM_ERR = $27
|
||||
DSK_ID_MISMAT = $29
|
||||
BYTE_DEC_ERR = $2e
|
||||
DOS_MISMATCH = $73
|
||||
ANY_FAULT = %11110000
|
||||
NO_BLOCKS = 1
|
||||
INV_TRACK = 2
|
||||
INSUFF_SPACE = 3
|
||||
FULL_DIRECTORY = 4
|
||||
FILE_NOT_FOUND = 5
|
||||
BAD_BAM = 6
|
||||
UNOPENED_VLIR = 7
|
||||
INV_RECORD = 8
|
||||
OUT_OF_RECORDS = 9
|
||||
STRUCT_MISMAT = 10
|
||||
BFR_OVERFLOW = 11
|
||||
CANCEL_ERR = 12
|
||||
DEV_NOT_FOUND = 13
|
||||
INCOMPATIBLE = 14
|
||||
HDR_NOT_THERE = $20
|
||||
NO_SYNC = $21
|
||||
DBLK_NOT_THERE = $22
|
||||
DAT_CHKSUM_ERR = $23
|
||||
WR_VER_ERR = $25
|
||||
WR_PR_ON = $26
|
||||
HDR_CHKSUM_ERR = $27
|
||||
DSK_ID_MISMAT = $29
|
||||
BYTE_DEC_ERR = $2e
|
||||
DOS_MISMATCH = $73
|
||||
|
||||
;Offsets
|
||||
; ???
|
||||
OFF_INDEX_PTR = 1
|
||||
; icons
|
||||
OFF_NM_ICNS = 0
|
||||
OFF_IC_XMOUSE = 1
|
||||
OFF_IC_YMOUSE = 3
|
||||
OFF_PIC_ICON = 0
|
||||
OFF_X_ICON_POS = 2
|
||||
OFF_Y_ICON_POS = 3
|
||||
OFF_WDTH_ICON = 4
|
||||
OFF_HEIGHT_ICON = 5
|
||||
OFF_SRV_RT_ICON = 6
|
||||
OFF_NX_ICON = 8
|
||||
; menu
|
||||
OFF_MY_TOP = 0
|
||||
OFF_MY_BOT = 1
|
||||
OFF_MX_LEFT = 2
|
||||
OFF_MX_RIGHT = 4
|
||||
OFF_NUM_M_ITEMS = 6
|
||||
OFF_1ST_M_ITEM = 7
|
||||
; dialog box
|
||||
OFF_DB_FORM = 0
|
||||
OFF_DB_TOP = 1
|
||||
OFF_DB_BOT = 2
|
||||
OFF_DB_LEFT = 3
|
||||
OFF_DB_RIGHT = 5
|
||||
OFF_DB_1STCMD = 7
|
||||
; directory
|
||||
; disk header
|
||||
OFF_TO_BAM = 4
|
||||
OFF_DISK_NAME = 144
|
||||
OFF_GS_DTYPE = 189
|
||||
OFF_OP_TR_SC = 171
|
||||
OFF_GS_ID = 173
|
||||
; dir entry
|
||||
; ???
|
||||
OFF_INDEX_PTR = 1
|
||||
; icons
|
||||
OFF_NM_ICNS = 0
|
||||
OFF_IC_XMOUSE = 1
|
||||
OFF_IC_YMOUSE = 3
|
||||
OFF_PIC_ICON = 0
|
||||
OFF_X_ICON_POS = 2
|
||||
OFF_Y_ICON_POS = 3
|
||||
OFF_WDTH_ICON = 4
|
||||
OFF_HEIGHT_ICON = 5
|
||||
OFF_SRV_RT_ICON = 6
|
||||
OFF_NX_ICON = 8
|
||||
; menu
|
||||
OFF_MY_TOP = 0
|
||||
OFF_MY_BOT = 1
|
||||
OFF_MX_LEFT = 2
|
||||
OFF_MX_RIGHT = 4
|
||||
OFF_NUM_M_ITEMS = 6
|
||||
OFF_1ST_M_ITEM = 7
|
||||
; dialog box
|
||||
OFF_DB_FORM = 0
|
||||
OFF_DB_TOP = 1
|
||||
OFF_DB_BOT = 2
|
||||
OFF_DB_LEFT = 3
|
||||
OFF_DB_RIGHT = 5
|
||||
OFF_DB_1STCMD = 7
|
||||
; directory
|
||||
; disk header
|
||||
OFF_TO_BAM = 4
|
||||
OFF_DISK_NAME = 144
|
||||
OFF_GS_DTYPE = 189
|
||||
OFF_OP_TR_SC = 171
|
||||
OFF_GS_ID = 173
|
||||
; dir entry
|
||||
.ifdef __GEOS_CBM__
|
||||
FRST_FILE_ENTRY = 2
|
||||
OFF_CFILE_TYPE = 0
|
||||
OFF_DE_TR_SC = 1
|
||||
OFF_FNAME = 3
|
||||
OFF_GHDR_PTR = 19
|
||||
OFF_GSTRUC_TYPE = 21
|
||||
OFF_GFILE_TYPE = 22
|
||||
OFF_YEAR = 23
|
||||
OFF_SIZE = 28
|
||||
OFF_NXT_FILE = 32
|
||||
FRST_FILE_ENTRY = 2
|
||||
OFF_CFILE_TYPE = 0
|
||||
OFF_DE_TR_SC = 1
|
||||
OFF_FNAME = 3
|
||||
OFF_GHDR_PTR = 19
|
||||
OFF_GSTRUC_TYPE = 21
|
||||
OFF_GFILE_TYPE = 22
|
||||
OFF_YEAR = 23
|
||||
OFF_SIZE = 28
|
||||
OFF_NXT_FILE = 32
|
||||
.else
|
||||
FRST_FILE_ENTRY = 43
|
||||
OFF_GSTRUC_TYPE = 0
|
||||
OFF_FNAME = 1
|
||||
OFF_GFILE_TYPE = 16
|
||||
OFF_DE_TR_SC = 17
|
||||
OFF_SIZE = 21
|
||||
OFF_YEAR = 25
|
||||
OFF_GHDR_PTR = 31
|
||||
OFF_NXT_FILE = 39
|
||||
FRST_FILE_ENTRY = 43
|
||||
OFF_GSTRUC_TYPE = 0
|
||||
OFF_FNAME = 1
|
||||
OFF_GFILE_TYPE = 16
|
||||
OFF_DE_TR_SC = 17
|
||||
OFF_SIZE = 21
|
||||
OFF_YEAR = 25
|
||||
OFF_GHDR_PTR = 31
|
||||
OFF_NXT_FILE = 39
|
||||
.endif
|
||||
; file header
|
||||
O_GHIC_WIDTH = 2
|
||||
O_GHIC_HEIGHT = 3
|
||||
O_GHIC_PIC = 4
|
||||
O_GHCMDR_TYPE = 68
|
||||
O_GHGEOS_TYPE = 69
|
||||
O_GHSTR_TYPE = 70
|
||||
O_GHST_ADDR = 71
|
||||
O_GHEND_ADDR = 73
|
||||
O_GHST_VEC = 75
|
||||
O_GHFNAME = 77
|
||||
O_128_FLAGS = 96
|
||||
O_GH_AUTHOR = 97
|
||||
O_GHP_DISK = 97
|
||||
O_GHP_FNAME = 117
|
||||
O_GHINFO_TXT = $a0
|
||||
; file header
|
||||
O_GHIC_WIDTH = 2
|
||||
O_GHIC_HEIGHT = 3
|
||||
O_GHIC_PIC = 4
|
||||
O_GHCMDR_TYPE = 68
|
||||
O_GHGEOS_TYPE = 69
|
||||
O_GHSTR_TYPE = 70
|
||||
O_GHST_ADDR = 71
|
||||
O_GHEND_ADDR = 73
|
||||
O_GHST_VEC = 75
|
||||
O_GHFNAME = 77
|
||||
O_128_FLAGS = 96
|
||||
O_GH_AUTHOR = 97
|
||||
O_GHP_DISK = 97
|
||||
O_GHP_FNAME = 117
|
||||
O_GHINFO_TXT = $a0
|
||||
|
||||
; values for CPU_DATA - C64 memory config
|
||||
RAM_64K = $30 ;64K RAM
|
||||
IO_IN = $35 ;60K RAM, 4K I/O space in
|
||||
KRNL_IO_IN = $36 ;kernal and I/O mapped into memory
|
||||
KRNL_BAS_IO_IN = $37 ;kernal, I/O and basic mapped into memory
|
||||
RAM_64K = $30 ;64K RAM
|
||||
IO_IN = $35 ;60K RAM, 4K I/O space in
|
||||
KRNL_IO_IN = $36 ;kernal and I/O mapped into memory
|
||||
KRNL_BAS_IO_IN = $37 ;kernal, I/O and basic mapped into memory
|
||||
|
||||
;values for config - C128 mmu
|
||||
CIOIN = $7E ;60K RAM, 4K I/O space in
|
||||
CRAM64K = $7F ;64K RAM
|
||||
CKRNLBASIOIN = $40 ;kernal, I/O and basic ROM's mapped into memory
|
||||
CKRNLIOIN = $4E ;Kernal ROM and I/O space mapped in
|
||||
CIOIN = $7E ;60K RAM, 4K I/O space in
|
||||
CRAM64K = $7F ;64K RAM
|
||||
CKRNLBASIOIN = $40 ;kernal, I/O and basic ROM's mapped into memory
|
||||
CKRNLIOIN = $4E ;Kernal ROM and I/O space mapped in
|
||||
|
||||
;values of faultData - pointer position vs. mouseTop/Bottom/Left/Right
|
||||
; bit numbers
|
||||
OFFTOP_BIT = 7
|
||||
OFFBOTTOM_BIT = 6
|
||||
OFFLEFT_BIT = 5
|
||||
OFFRIGHT_BIT = 4
|
||||
OFFMENU_BIT = 3
|
||||
; masks
|
||||
SET_OFFTOP = %10000000
|
||||
SET_OFFBOTTOM = %01000000
|
||||
SET_OFFLEFT = %00100000
|
||||
SET_OFFRIGHT = %00010000
|
||||
SET_OFFMENU = %00001000
|
||||
; bit numbers
|
||||
OFFTOP_BIT = 7
|
||||
OFFBOTTOM_BIT = 6
|
||||
OFFLEFT_BIT = 5
|
||||
OFFRIGHT_BIT = 4
|
||||
OFFMENU_BIT = 3
|
||||
; masks
|
||||
SET_OFFTOP = %10000000
|
||||
SET_OFFBOTTOM = %01000000
|
||||
SET_OFFLEFT = %00100000
|
||||
SET_OFFRIGHT = %00010000
|
||||
SET_OFFMENU = %00001000
|
||||
|
||||
;values of currentMode
|
||||
; bit numbers
|
||||
UNDERLINE_BIT = 7
|
||||
BOLD_BIT = 6
|
||||
REVERSE_BIT = 5
|
||||
ITALIC_BIT = 4
|
||||
OUTLINE_BIT = 3
|
||||
SUPERSCRIPT_BIT = 2
|
||||
SUBSCRIPT_BIT = 1
|
||||
; masks
|
||||
SET_UNDERLINE = %10000000
|
||||
SET_BOLD = %01000000
|
||||
SET_REVERSE = %00100000
|
||||
SET_ITALIC = %00010000
|
||||
SET_OUTLINE = %00001000
|
||||
SET_SUPERSCRIPT = %00000100
|
||||
SET_SUBSCRIPT = %00000010
|
||||
SET_PLAINTEXT = %00000000
|
||||
; bit numbers
|
||||
UNDERLINE_BIT = 7
|
||||
BOLD_BIT = 6
|
||||
REVERSE_BIT = 5
|
||||
ITALIC_BIT = 4
|
||||
OUTLINE_BIT = 3
|
||||
SUPERSCRIPT_BIT = 2
|
||||
SUBSCRIPT_BIT = 1
|
||||
; masks
|
||||
SET_UNDERLINE = %10000000
|
||||
SET_BOLD = %01000000
|
||||
SET_REVERSE = %00100000
|
||||
SET_ITALIC = %00010000
|
||||
SET_OUTLINE = %00001000
|
||||
SET_SUPERSCRIPT = %00000100
|
||||
SET_SUBSCRIPT = %00000010
|
||||
SET_PLAINTEXT = %00000000
|
||||
|
||||
;Process control variable
|
||||
; bit numbers
|
||||
RUNABLE_BIT = 7
|
||||
BLOCKED_BIT = 6
|
||||
FROZEN_BIT = 5
|
||||
NOTIMER_BIT = 4
|
||||
; masks
|
||||
SET_RUNABLE = %10000000
|
||||
SET_BLOCKED = %01000000
|
||||
SET_FROZEN = %00100000
|
||||
SET_NOTIMER = %00010000
|
||||
; bit numbers
|
||||
RUNABLE_BIT = 7
|
||||
BLOCKED_BIT = 6
|
||||
FROZEN_BIT = 5
|
||||
NOTIMER_BIT = 4
|
||||
; masks
|
||||
SET_RUNABLE = %10000000
|
||||
SET_BLOCKED = %01000000
|
||||
SET_FROZEN = %00100000
|
||||
SET_NOTIMER = %00010000
|
||||
|
||||
;mouseOn
|
||||
; bit numbers
|
||||
MOUSEON_BIT = 7
|
||||
MENUON_BIT = 6
|
||||
ICONSON_BIT = 5
|
||||
; masks
|
||||
SET_MSE_ON = %10000000
|
||||
SET_MENUON = %01000000
|
||||
SET_ICONSON = %00100000
|
||||
; bit numbers
|
||||
MOUSEON_BIT = 7
|
||||
MENUON_BIT = 6
|
||||
ICONSON_BIT = 5
|
||||
; masks
|
||||
SET_MSE_ON = %10000000
|
||||
SET_MENUON = %01000000
|
||||
SET_ICONSON = %00100000
|
||||
|
||||
;pressFlag
|
||||
; bit numbers
|
||||
KEYPRESS_BIT = 7
|
||||
INPUT_BIT = 6
|
||||
MOUSE_BIT = 5
|
||||
; masks
|
||||
SET_KEYPRESS = %10000000
|
||||
SET_INPUTCHG = %01000000
|
||||
SET_MOUSE = %00100000
|
||||
; bit numbers
|
||||
KEYPRESS_BIT = 7
|
||||
INPUT_BIT = 6
|
||||
MOUSE_BIT = 5
|
||||
; masks
|
||||
SET_KEYPRESS = %10000000
|
||||
SET_INPUTCHG = %01000000
|
||||
SET_MOUSE = %00100000
|
||||
|
||||
;dispBufferOn
|
||||
ST_WRGS_FORE = $20
|
||||
ST_WR_BACK = $40
|
||||
ST_WR_FORE = $80
|
||||
ST_WRGS_FORE = $20
|
||||
ST_WR_BACK = $40
|
||||
ST_WR_FORE = $80
|
||||
|
||||
;alarmSetFlag
|
||||
ALARMMASK = %00000100
|
||||
ALARMMASK = %00000100
|
||||
|
||||
;PutDecimal
|
||||
;leading zeroes
|
||||
SET_NOSURPRESS = %00000000
|
||||
SET_SURPRESS = %01000000
|
||||
SET_NOSURPRESS = %00000000
|
||||
SET_SURPRESS = %01000000
|
||||
;justification
|
||||
SET_RIGHTJUST = %00000000
|
||||
SET_LEFTJUST = %10000000
|
||||
SET_RIGHTJUST = %00000000
|
||||
SET_LEFTJUST = %10000000
|
||||
|
||||
;icons, menus status flags
|
||||
ST_FLASH = $80
|
||||
ST_INVERT = $40
|
||||
ST_LD_AT_ADDR = $01
|
||||
ST_LD_DATA = $80
|
||||
ST_PR_DATA = $40
|
||||
ST_WR_PR = $40
|
||||
ST_FLASH = $80
|
||||
ST_INVERT = $40
|
||||
ST_LD_AT_ADDR = $01
|
||||
ST_LD_DATA = $80
|
||||
ST_PR_DATA = $40
|
||||
ST_WR_PR = $40
|
||||
|
||||
;???
|
||||
ADD1_W = $2000
|
||||
DOUBLE_B = $80
|
||||
DOUBLE_W = $8000
|
||||
ADD1_W = $2000
|
||||
DOUBLE_B = $80
|
||||
DOUBLE_W = $8000
|
||||
|
||||
CLR_SAVE = %01000000
|
||||
CONSTRAINED = %01000000
|
||||
UN_CONSTRAINED = %00000000
|
||||
FG_SAVE = %10000000
|
||||
CLR_SAVE = %01000000
|
||||
CONSTRAINED = %01000000
|
||||
UN_CONSTRAINED = %00000000
|
||||
FG_SAVE = %10000000
|
||||
|
||||
FUTURE1 = 7
|
||||
FUTURE2 = 8
|
||||
FUTURE3 = 9
|
||||
FUTURE4 = 10
|
||||
USELAST = 127
|
||||
SHORTCUT = 128
|
||||
FUTURE1 = 7
|
||||
FUTURE2 = 8
|
||||
FUTURE3 = 9
|
||||
FUTURE4 = 10
|
||||
USELAST = 127
|
||||
SHORTCUT = 128
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
|
||||
; char BlkAlloc (struct tr_se output[], int length);
|
||||
|
||||
.import popax, setoserror
|
||||
.export _BlkAlloc
|
||||
.import popax, setoserror
|
||||
.export _BlkAlloc
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_BlkAlloc:
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r4L
|
||||
stx r4H
|
||||
jsr BlkAlloc
|
||||
jmp setoserror
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r4L
|
||||
stx r4H
|
||||
jsr BlkAlloc
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
|
||||
; int CalcBlksFree (void);
|
||||
|
||||
.import __oserror
|
||||
.export _CalcBlksFree
|
||||
.import __oserror
|
||||
.export _CalcBlksFree
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_CalcBlksFree:
|
||||
jsr CalcBlksFree
|
||||
stx __oserror
|
||||
lda r4L
|
||||
ldx r4H
|
||||
rts
|
||||
jsr CalcBlksFree
|
||||
stx __oserror
|
||||
lda r4L
|
||||
ldx r4H
|
||||
rts
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
|
||||
; char FreeBlock (struct tr_se *TS);
|
||||
|
||||
.import gettrse, setoserror
|
||||
.export _FreeBlock
|
||||
.import gettrse, setoserror
|
||||
.export _FreeBlock
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_FreeBlock:
|
||||
jsr gettrse
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr FreeBlock
|
||||
jmp setoserror
|
||||
jsr gettrse
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr FreeBlock
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
|
||||
; char GetBlock (struct tr_se *myTS, char *buffer);
|
||||
|
||||
.import popax, setoserror
|
||||
.import gettrse
|
||||
.export _GetBlock
|
||||
.import popax, setoserror
|
||||
.import gettrse
|
||||
.export _GetBlock
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_GetBlock:
|
||||
sta r4L
|
||||
stx r4H
|
||||
jsr popax
|
||||
jsr gettrse
|
||||
sta r1L
|
||||
stx r1H
|
||||
jsr GetBlock
|
||||
jmp setoserror
|
||||
sta r4L
|
||||
stx r4H
|
||||
jsr popax
|
||||
jsr gettrse
|
||||
sta r1L
|
||||
stx r1H
|
||||
jsr GetBlock
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; char GetDirHead (void);
|
||||
|
||||
.import setoserror
|
||||
.export _GetDirHead
|
||||
.import setoserror
|
||||
.export _GetDirHead
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
_GetDirHead:
|
||||
jsr GetDirHead
|
||||
jmp setoserror
|
||||
jsr GetDirHead
|
||||
jmp setoserror
|
||||
|
||||
@@ -6,33 +6,33 @@
|
||||
; void GetPtrCurDkNm (char *curName);
|
||||
; (fills curName[17] with current disk's name)
|
||||
|
||||
.importzp ptr4, ptr3
|
||||
.import __oserror
|
||||
.export _GetPtrCurDkNm
|
||||
.importzp ptr4, ptr3
|
||||
.import __oserror
|
||||
.export _GetPtrCurDkNm
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_GetPtrCurDkNm:
|
||||
sta ptr3
|
||||
stx ptr3+1
|
||||
ldx #ptr4
|
||||
jsr GetPtrCurDkNm
|
||||
ldy #0
|
||||
txa
|
||||
bne fin
|
||||
namelp: lda (ptr4),y
|
||||
sta ptr3
|
||||
stx ptr3+1
|
||||
ldx #ptr4
|
||||
jsr GetPtrCurDkNm
|
||||
ldy #0
|
||||
txa
|
||||
bne fin
|
||||
namelp: lda (ptr4),y
|
||||
.ifdef __GEOS_CBM__
|
||||
cmp #$a0
|
||||
cmp #$a0
|
||||
.else
|
||||
cmp #0
|
||||
cmp #0
|
||||
.endif
|
||||
beq fin
|
||||
sta (ptr3),y
|
||||
iny
|
||||
cpy #16
|
||||
bne namelp
|
||||
fin: lda #0
|
||||
sta (ptr3),y
|
||||
stx __oserror
|
||||
rts
|
||||
beq fin
|
||||
sta (ptr3),y
|
||||
iny
|
||||
cpy #16
|
||||
bne namelp
|
||||
fin: lda #0
|
||||
sta (ptr3),y
|
||||
stx __oserror
|
||||
rts
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
;
|
||||
; 29.1.00
|
||||
|
||||
.export gettrse
|
||||
.importzp ptr4
|
||||
.export gettrse
|
||||
.importzp ptr4
|
||||
|
||||
gettrse:
|
||||
sta ptr4
|
||||
stx ptr4+1
|
||||
ldy #1
|
||||
lda (ptr4),y
|
||||
tax
|
||||
dey
|
||||
lda (ptr4),y
|
||||
rts
|
||||
sta ptr4
|
||||
stx ptr4+1
|
||||
ldy #1
|
||||
lda (ptr4),y
|
||||
tax
|
||||
dey
|
||||
lda (ptr4),y
|
||||
rts
|
||||
|
||||
@@ -5,24 +5,24 @@
|
||||
|
||||
; char NxtBlkAlloc (struct tr_se *startTS, struct tr_se output[], int length );
|
||||
|
||||
.import popax, setoserror
|
||||
.import gettrse
|
||||
.importzp ptr4
|
||||
.export _NxtBlkAlloc
|
||||
.import popax, setoserror
|
||||
.import gettrse
|
||||
.importzp ptr4
|
||||
.export _NxtBlkAlloc
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_NxtBlkAlloc:
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r4L
|
||||
stx r4H
|
||||
jsr popax
|
||||
jsr gettrse
|
||||
sta r3L
|
||||
stx r3H
|
||||
jsr NxtBlkAlloc
|
||||
jmp setoserror
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r4L
|
||||
stx r4H
|
||||
jsr popax
|
||||
jsr gettrse
|
||||
sta r3L
|
||||
stx r3H
|
||||
jsr NxtBlkAlloc
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; char OpenDisk (void);
|
||||
|
||||
.import setoserror
|
||||
.export _OpenDisk
|
||||
.import setoserror
|
||||
.export _OpenDisk
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
_OpenDisk:
|
||||
jsr OpenDisk
|
||||
jmp setoserror
|
||||
jsr OpenDisk
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
|
||||
; char PutBlock (struct tr_se *myTS, char *buffer);
|
||||
|
||||
.import popax, setoserror
|
||||
.import gettrse
|
||||
.export _PutBlock
|
||||
.import popax, setoserror
|
||||
.import gettrse
|
||||
.export _PutBlock
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_PutBlock:
|
||||
sta r4L
|
||||
stx r4H
|
||||
jsr popax
|
||||
jsr gettrse
|
||||
sta r1L
|
||||
stx r1H
|
||||
jsr PutBlock
|
||||
jmp setoserror
|
||||
sta r4L
|
||||
stx r4H
|
||||
jsr popax
|
||||
jsr gettrse
|
||||
sta r1L
|
||||
stx r1H
|
||||
jsr PutBlock
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; char PutDirHead (void);
|
||||
|
||||
.import setoserror
|
||||
.export _PutDirHead
|
||||
.import setoserror
|
||||
.export _PutDirHead
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
_PutDirHead:
|
||||
jsr PutDirHead
|
||||
jmp setoserror
|
||||
jsr PutDirHead
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
|
||||
; struct tr_se SetNextFree (struct tr_se *startTS);
|
||||
|
||||
.import __oserror
|
||||
.import gettrse
|
||||
.export _SetNextFree
|
||||
.import __oserror
|
||||
.import gettrse
|
||||
.export _SetNextFree
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_SetNextFree:
|
||||
jsr gettrse
|
||||
sta r3L
|
||||
stx r3H
|
||||
jsr SetNextFree
|
||||
stx __oserror
|
||||
lda r3L
|
||||
ldx r3H
|
||||
rts
|
||||
jsr gettrse
|
||||
sta r3L
|
||||
stx r3H
|
||||
jsr SetNextFree
|
||||
stx __oserror
|
||||
lda r3L
|
||||
ldx r3H
|
||||
rts
|
||||
|
||||
@@ -3,32 +3,32 @@
|
||||
;
|
||||
; 25.12.99
|
||||
|
||||
.export DB_get2lines
|
||||
.importzp ptr3,ptr4
|
||||
.import popax
|
||||
.export DB_get2lines
|
||||
.importzp ptr3,ptr4
|
||||
.import popax
|
||||
|
||||
DB_get2lines:
|
||||
sta ptr4 ; fetch line 2
|
||||
stx ptr4+1
|
||||
jsr popax
|
||||
sta ptr3 ; fetch line 1
|
||||
stx ptr3+1
|
||||
ldx #ptr3
|
||||
jsr checknull
|
||||
ldx #ptr4
|
||||
jmp checknull
|
||||
sta ptr4 ; fetch line 2
|
||||
stx ptr4+1
|
||||
jsr popax
|
||||
sta ptr3 ; fetch line 1
|
||||
stx ptr3+1
|
||||
ldx #ptr3
|
||||
jsr checknull
|
||||
ldx #ptr4
|
||||
jmp checknull
|
||||
|
||||
checknull:
|
||||
lda $0,x
|
||||
ora $1,x
|
||||
bne cn_end
|
||||
lda #<nullstring
|
||||
sta $0,x
|
||||
lda #>nullstring
|
||||
sta $1,x
|
||||
cn_end: rts
|
||||
lda $0,x
|
||||
ora $1,x
|
||||
bne cn_end
|
||||
lda #<nullstring
|
||||
sta $0,x
|
||||
lda #>nullstring
|
||||
sta $1,x
|
||||
cn_end: rts
|
||||
|
||||
.rodata
|
||||
|
||||
nullstring:
|
||||
.byte 0
|
||||
.byte 0
|
||||
|
||||
@@ -5,56 +5,56 @@
|
||||
|
||||
; char DlgBoxFileSelect (char *class, char ftype, char *fname);
|
||||
|
||||
.export _DlgBoxFileSelect
|
||||
.import popa, popax
|
||||
.import _DoDlgBox
|
||||
.export _DlgBoxFileSelect
|
||||
.import popa, popax
|
||||
.import _DoDlgBox
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
.include "geosmac.inc"
|
||||
.include "const.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
.include "geosmac.inc"
|
||||
.include "const.inc"
|
||||
|
||||
_DlgBoxFileSelect:
|
||||
sta tmp_r5
|
||||
stx tmp_r5+1
|
||||
jsr popa
|
||||
sta tmp_r7L
|
||||
jsr popax
|
||||
sta tmp_r10
|
||||
stx tmp_r10+1
|
||||
sta tmp_r5
|
||||
stx tmp_r5+1
|
||||
jsr popa
|
||||
sta tmp_r7L
|
||||
jsr popax
|
||||
sta tmp_r10
|
||||
stx tmp_r10+1
|
||||
|
||||
DB_FS_reload:
|
||||
MoveW tmp_r5, r5
|
||||
MoveW tmp_r10, r10
|
||||
MoveB tmp_r7L, r7L
|
||||
MoveW tmp_r5, r5
|
||||
MoveW tmp_r10, r10
|
||||
MoveB tmp_r7L, r7L
|
||||
|
||||
lda #<paramStrFileSelect
|
||||
ldx #>paramStrFileSelect
|
||||
jsr _DoDlgBox
|
||||
cmp #DISK
|
||||
bne DB_FS_Fin
|
||||
jsr OpenDisk
|
||||
txa
|
||||
beq DB_FS_reload
|
||||
lda #<paramStrFileSelect
|
||||
ldx #>paramStrFileSelect
|
||||
jsr _DoDlgBox
|
||||
cmp #DISK
|
||||
bne DB_FS_Fin
|
||||
jsr OpenDisk
|
||||
txa
|
||||
beq DB_FS_reload
|
||||
DB_FS_Fin:
|
||||
rts
|
||||
rts
|
||||
|
||||
.rodata
|
||||
|
||||
paramStrFileSelect:
|
||||
.byte DEF_DB_POS | 1
|
||||
.byte DBGETFILES, 4, 4
|
||||
.byte OPEN, DBI_X_2, DBI_Y_0+16
|
||||
.byte DISK, DBI_X_2, DBI_Y_0+32+1
|
||||
.byte CANCEL, DBI_X_2, DBI_Y_0+64+3
|
||||
.byte NULL
|
||||
.byte DEF_DB_POS | 1
|
||||
.byte DBGETFILES, 4, 4
|
||||
.byte OPEN, DBI_X_2, DBI_Y_0+16
|
||||
.byte DISK, DBI_X_2, DBI_Y_0+32+1
|
||||
.byte CANCEL, DBI_X_2, DBI_Y_0+64+3
|
||||
.byte NULL
|
||||
|
||||
.bss
|
||||
|
||||
tmp_r5:
|
||||
.res 2
|
||||
.res 2
|
||||
tmp_r7L:
|
||||
.res 1
|
||||
.res 1
|
||||
tmp_r10:
|
||||
.res 2
|
||||
.res 2
|
||||
|
||||
@@ -5,33 +5,33 @@
|
||||
|
||||
; char DlgBoxGetString (char *string, char strlen, char *line1,char *line2);
|
||||
|
||||
.export _DlgBoxGetString
|
||||
.import DB_get2lines, _DoDlgBox
|
||||
.importzp ptr2, ptr3, ptr4
|
||||
.import popa, popax
|
||||
.export _DlgBoxGetString
|
||||
.import DB_get2lines, _DoDlgBox
|
||||
.importzp ptr2, ptr3, ptr4
|
||||
.import popa, popax
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
|
||||
_DlgBoxGetString:
|
||||
jsr DB_get2lines
|
||||
jsr popa
|
||||
sta DB_strlen
|
||||
jsr popax
|
||||
sta ptr2
|
||||
stx ptr2+1
|
||||
lda #<paramStrGetString
|
||||
ldx #>paramStrGetString
|
||||
jmp _DoDlgBox
|
||||
jsr DB_get2lines
|
||||
jsr popa
|
||||
sta DB_strlen
|
||||
jsr popax
|
||||
sta ptr2
|
||||
stx ptr2+1
|
||||
lda #<paramStrGetString
|
||||
ldx #>paramStrGetString
|
||||
jmp _DoDlgBox
|
||||
|
||||
.data
|
||||
|
||||
paramStrGetString:
|
||||
.byte DEF_DB_POS | 1
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_1_Y, ptr3
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr4
|
||||
.byte DBGETSTRING, TXT_LN_X, TXT_LN_3_Y, ptr2
|
||||
.byte DEF_DB_POS | 1
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_1_Y, ptr3
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr4
|
||||
.byte DBGETSTRING, TXT_LN_X, TXT_LN_3_Y, ptr2
|
||||
DB_strlen:
|
||||
.byte 17
|
||||
.byte CANCEL, DBI_X_2, DBI_Y_2
|
||||
.byte NULL
|
||||
.byte 17
|
||||
.byte CANCEL, DBI_X_2, DBI_Y_2
|
||||
.byte NULL
|
||||
|
||||
@@ -5,24 +5,24 @@
|
||||
|
||||
; char DlgBoxOk (char *line1,char *line2);
|
||||
|
||||
.export _DlgBoxOk
|
||||
.import DB_get2lines, _DoDlgBox
|
||||
.importzp ptr3, ptr4
|
||||
.export _DlgBoxOk
|
||||
.import DB_get2lines, _DoDlgBox
|
||||
.importzp ptr3, ptr4
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
|
||||
_DlgBoxOk:
|
||||
jsr DB_get2lines
|
||||
lda #<paramStrOk
|
||||
ldx #>paramStrOk
|
||||
jmp _DoDlgBox
|
||||
jsr DB_get2lines
|
||||
lda #<paramStrOk
|
||||
ldx #>paramStrOk
|
||||
jmp _DoDlgBox
|
||||
|
||||
.rodata
|
||||
|
||||
paramStrOk:
|
||||
.byte DEF_DB_POS | 1
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
|
||||
.byte OK, DBI_X_0, DBI_Y_2
|
||||
.byte NULL
|
||||
.byte DEF_DB_POS | 1
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
|
||||
.byte OK, DBI_X_0, DBI_Y_2
|
||||
.byte NULL
|
||||
|
||||
@@ -5,25 +5,25 @@
|
||||
|
||||
; char DlgBoxOkCancel (char *line1,char *line2);
|
||||
|
||||
.export _DlgBoxOkCancel
|
||||
.import DB_get2lines, _DoDlgBox
|
||||
.importzp ptr3, ptr4
|
||||
.export _DlgBoxOkCancel
|
||||
.import DB_get2lines, _DoDlgBox
|
||||
.importzp ptr3, ptr4
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
|
||||
_DlgBoxOkCancel:
|
||||
jsr DB_get2lines
|
||||
lda #<paramStrOkCancel
|
||||
ldx #>paramStrOkCancel
|
||||
jmp _DoDlgBox
|
||||
jsr DB_get2lines
|
||||
lda #<paramStrOkCancel
|
||||
ldx #>paramStrOkCancel
|
||||
jmp _DoDlgBox
|
||||
|
||||
.rodata
|
||||
|
||||
paramStrOkCancel:
|
||||
.byte DEF_DB_POS | 1
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
|
||||
.byte OK, DBI_X_0, DBI_Y_2
|
||||
.byte CANCEL, DBI_X_2, DBI_Y_2
|
||||
.byte NULL
|
||||
.byte DEF_DB_POS | 1
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
|
||||
.byte OK, DBI_X_0, DBI_Y_2
|
||||
.byte CANCEL, DBI_X_2, DBI_Y_2
|
||||
.byte NULL
|
||||
|
||||
@@ -5,25 +5,25 @@
|
||||
|
||||
; char DlgBoxYesNo (char *line1,char *line2);
|
||||
|
||||
.export _DlgBoxYesNo
|
||||
.import DB_get2lines, _DoDlgBox
|
||||
.importzp ptr3, ptr4
|
||||
.export _DlgBoxYesNo
|
||||
.import DB_get2lines, _DoDlgBox
|
||||
.importzp ptr3, ptr4
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
|
||||
_DlgBoxYesNo:
|
||||
jsr DB_get2lines
|
||||
lda #<paramStrYesNo
|
||||
ldx #>paramStrYesNo
|
||||
jmp _DoDlgBox
|
||||
jsr DB_get2lines
|
||||
lda #<paramStrYesNo
|
||||
ldx #>paramStrYesNo
|
||||
jmp _DoDlgBox
|
||||
|
||||
.rodata
|
||||
|
||||
paramStrYesNo:
|
||||
.byte DEF_DB_POS | 1
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
|
||||
.byte YES, DBI_X_0, DBI_Y_2
|
||||
.byte NO, DBI_X_2, DBI_Y_2
|
||||
.byte NULL
|
||||
.byte DEF_DB_POS | 1
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
|
||||
.byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
|
||||
.byte YES, DBI_X_0, DBI_Y_2
|
||||
.byte NO, DBI_X_2, DBI_Y_2
|
||||
.byte NULL
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
|
||||
; char DoDlgBox (char *myParamString);
|
||||
|
||||
.export _DoDlgBox
|
||||
.export _DoDlgBox
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_DoDlgBox:
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr DoDlgBox
|
||||
ldx #0
|
||||
lda r0L
|
||||
rts
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr DoDlgBox
|
||||
ldx #0
|
||||
lda r0L
|
||||
rts
|
||||
|
||||
@@ -12,40 +12,40 @@
|
||||
void _mbprintout(void);
|
||||
|
||||
static dlgBoxStr _mbdlg_EMPTY = {
|
||||
DB_DEFPOS(1),
|
||||
DB_OPVEC(&RstrFrmDialogue),
|
||||
DB_USRROUT(&_mbprintout),
|
||||
DB_END,
|
||||
DB_DEFPOS(1),
|
||||
DB_OPVEC(&RstrFrmDialogue),
|
||||
DB_USRROUT(&_mbprintout),
|
||||
DB_END,
|
||||
};
|
||||
|
||||
static dlgBoxStr _mbdlg_OK = {
|
||||
DB_DEFPOS(1),
|
||||
DB_USRROUT(&_mbprintout),
|
||||
DB_ICON(OK, DBI_X_1, DBI_Y_2),
|
||||
DB_END,
|
||||
DB_DEFPOS(1),
|
||||
DB_USRROUT(&_mbprintout),
|
||||
DB_ICON(OK, DBI_X_1, DBI_Y_2),
|
||||
DB_END,
|
||||
};
|
||||
|
||||
static dlgBoxStr _mbdlg_OKCANCEL = {
|
||||
DB_DEFPOS(1),
|
||||
DB_USRROUT(&_mbprintout),
|
||||
DB_ICON(OK, DBI_X_0, DBI_Y_2),
|
||||
DB_ICON(CANCEL, DBI_X_2, DBI_Y_2),
|
||||
DB_END,
|
||||
DB_DEFPOS(1),
|
||||
DB_USRROUT(&_mbprintout),
|
||||
DB_ICON(OK, DBI_X_0, DBI_Y_2),
|
||||
DB_ICON(CANCEL, DBI_X_2, DBI_Y_2),
|
||||
DB_END,
|
||||
};
|
||||
|
||||
static dlgBoxStr _mbdlg_YESNO = {
|
||||
DB_DEFPOS(1),
|
||||
DB_USRROUT(&_mbprintout),
|
||||
DB_ICON(YES, DBI_X_0, DBI_Y_2),
|
||||
DB_ICON(NO, DBI_X_2, DBI_Y_2),
|
||||
DB_END,
|
||||
DB_DEFPOS(1),
|
||||
DB_USRROUT(&_mbprintout),
|
||||
DB_ICON(YES, DBI_X_0, DBI_Y_2),
|
||||
DB_ICON(NO, DBI_X_2, DBI_Y_2),
|
||||
DB_END,
|
||||
};
|
||||
|
||||
static dlgBoxStr *_mbboxes[] = {
|
||||
&_mbdlg_EMPTY,
|
||||
&_mbdlg_OK,
|
||||
&_mbdlg_OKCANCEL,
|
||||
&_mbdlg_YESNO
|
||||
&_mbdlg_EMPTY,
|
||||
&_mbdlg_OK,
|
||||
&_mbdlg_OKCANCEL,
|
||||
&_mbdlg_YESNO
|
||||
};
|
||||
|
||||
static char _mbbuffer[256];
|
||||
@@ -63,13 +63,13 @@ char MessageBox(char mode, const char *format, ...)
|
||||
/* replace LFs by CRs */
|
||||
buf = &_mbbuffer[0];
|
||||
while (*buf) {
|
||||
if (*buf==LF) *buf=CR;
|
||||
++buf;
|
||||
if (*buf==LF) *buf=CR;
|
||||
++buf;
|
||||
}
|
||||
|
||||
/* validate mode */
|
||||
if (mode>=MB_LAST)
|
||||
mode = MB_EMPTY;
|
||||
mode = MB_EMPTY;
|
||||
|
||||
return DoDlgBox(_mbboxes[mode]);
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
; char RstrFrmDialogue (void);
|
||||
|
||||
.export _RstrFrmDialogue
|
||||
.export _RstrFrmDialogue
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_RstrFrmDialogue = RstrFrmDialogue
|
||||
|
||||
@@ -6,89 +6,89 @@
|
||||
;
|
||||
; only ONE opened file at a time, only O_RDONLY flag
|
||||
|
||||
; int open (const char* name, int flags, ...); /* May take a mode argument */
|
||||
; int open (const char* name, int flags, ...); /* May take a mode argument */
|
||||
; int __fastcall__ close (int fd);
|
||||
; int __fastcall__ read (int fd, void* buf, unsigned count);
|
||||
|
||||
FILEDES = 3 ; first free to use file descriptor
|
||||
FILEDES = 3 ; first free to use file descriptor
|
||||
|
||||
.importzp ptr1, ptr2, ptr3, tmp1
|
||||
.import addysp, popax
|
||||
.import __oserror
|
||||
.import _FindFile, _ReadByte
|
||||
.export _open, _close, _read
|
||||
.import _FindFile, _ReadByte
|
||||
.export _open, _close, _read
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
.include "errno.inc"
|
||||
.include "fcntl.inc"
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
.include "errno.inc"
|
||||
.include "fcntl.inc"
|
||||
|
||||
_open:
|
||||
cpy #4 ; correct # of arguments (bytes)?
|
||||
beq @parmok ; parameter count ok
|
||||
tya ; parm count < 4 shouldn't be needed to be...
|
||||
sec ; ...checked (it generates a c compiler warning)
|
||||
sbc #4
|
||||
tay
|
||||
jsr addysp ; fix stack, throw away unused parameters
|
||||
cpy #4 ; correct # of arguments (bytes)?
|
||||
beq @parmok ; parameter count ok
|
||||
tya ; parm count < 4 shouldn't be needed to be...
|
||||
sec ; ...checked (it generates a c compiler warning)
|
||||
sbc #4
|
||||
tay
|
||||
jsr addysp ; fix stack, throw away unused parameters
|
||||
|
||||
; Parameters ok. Pop the flags and save them into tmp3
|
||||
|
||||
@parmok:
|
||||
jsr popax ; Get flags
|
||||
sta tmp1
|
||||
jsr popax ; Get name
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
|
||||
lda filedesc ; is there a file already open?
|
||||
bne @alreadyopen
|
||||
|
||||
lda tmp1 ; check open mode
|
||||
and #(O_RDWR | O_CREAT)
|
||||
cmp #O_RDONLY ; only O_RDONLY is valid
|
||||
bne @badmode
|
||||
|
||||
lda ptr1
|
||||
ldx ptr1+1
|
||||
jsr _FindFile ; try to find the file
|
||||
tax
|
||||
bne @oserror
|
||||
|
||||
lda dirEntryBuf + OFF_DE_TR_SC ; tr&se for ReadByte (r1)
|
||||
sta f_track
|
||||
lda dirEntryBuf + OFF_DE_TR_SC + 1
|
||||
sta f_sector
|
||||
lda #<diskBlkBuf ; buffer for ReadByte (r4)
|
||||
sta f_buffer
|
||||
lda #>diskBlkBuf
|
||||
sta f_buffer+1
|
||||
ldx #0 ; offset for ReadByte (r5)
|
||||
stx f_offset
|
||||
stx f_offset+1
|
||||
lda #0 ; clear errors
|
||||
sta __oserror
|
||||
jsr __seterrno
|
||||
lda #FILEDES ; return fd
|
||||
sta filedesc
|
||||
rts
|
||||
jsr popax ; Get flags
|
||||
sta tmp1
|
||||
jsr popax ; Get name
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
|
||||
lda filedesc ; is there a file already open?
|
||||
bne @alreadyopen
|
||||
|
||||
lda tmp1 ; check open mode
|
||||
and #(O_RDWR | O_CREAT)
|
||||
cmp #O_RDONLY ; only O_RDONLY is valid
|
||||
bne @badmode
|
||||
|
||||
lda ptr1
|
||||
ldx ptr1+1
|
||||
jsr _FindFile ; try to find the file
|
||||
tax
|
||||
bne @oserror
|
||||
|
||||
lda dirEntryBuf + OFF_DE_TR_SC ; tr&se for ReadByte (r1)
|
||||
sta f_track
|
||||
lda dirEntryBuf + OFF_DE_TR_SC + 1
|
||||
sta f_sector
|
||||
lda #<diskBlkBuf ; buffer for ReadByte (r4)
|
||||
sta f_buffer
|
||||
lda #>diskBlkBuf
|
||||
sta f_buffer+1
|
||||
ldx #0 ; offset for ReadByte (r5)
|
||||
stx f_offset
|
||||
stx f_offset+1
|
||||
lda #0 ; clear errors
|
||||
sta __oserror
|
||||
jsr __seterrno
|
||||
lda #FILEDES ; return fd
|
||||
sta filedesc
|
||||
rts
|
||||
@badmode:
|
||||
lda #EINVAL ; invalid parameters - invalid open mode
|
||||
.byte $2c ; skip
|
||||
lda #EINVAL ; invalid parameters - invalid open mode
|
||||
.byte $2c ; skip
|
||||
@alreadyopen:
|
||||
lda #EMFILE ; too many opened files (there can be only one)
|
||||
jmp __directerrno ; set errno, clear oserror, return -1
|
||||
lda #EMFILE ; too many opened files (there can be only one)
|
||||
jmp __directerrno ; set errno, clear oserror, return -1
|
||||
@oserror:
|
||||
jmp __mappederrno ; set platform error code, return -1
|
||||
jmp __mappederrno ; set platform error code, return -1
|
||||
|
||||
_close:
|
||||
lda #0
|
||||
sta __oserror
|
||||
jsr __seterrno ; clear errors
|
||||
lda #0 ; clear fd
|
||||
sta filedesc
|
||||
tax
|
||||
rts
|
||||
lda #0
|
||||
sta __oserror
|
||||
jsr __seterrno ; clear errors
|
||||
lda #0 ; clear fd
|
||||
sta filedesc
|
||||
tax
|
||||
rts
|
||||
|
||||
_read:
|
||||
; a/x - number of bytes
|
||||
@@ -96,96 +96,96 @@ _read:
|
||||
; popax - fd, must be == to the above one
|
||||
; return -1+__oserror or number of bytes read
|
||||
|
||||
eor #$ff
|
||||
sta ptr1
|
||||
txa
|
||||
eor #$ff
|
||||
sta ptr1+1 ; -(# of bytes to read)-1
|
||||
jsr popax
|
||||
sta ptr2
|
||||
stx ptr2+1 ; buffer ptr
|
||||
jsr popax
|
||||
cmp #FILEDES ; lo-byte == FILEDES
|
||||
bne @filenotopen
|
||||
txa ; hi-byte == 0
|
||||
beq @fileok ; fd must be == FILEDES
|
||||
eor #$ff
|
||||
sta ptr1
|
||||
txa
|
||||
eor #$ff
|
||||
sta ptr1+1 ; -(# of bytes to read)-1
|
||||
jsr popax
|
||||
sta ptr2
|
||||
stx ptr2+1 ; buffer ptr
|
||||
jsr popax
|
||||
cmp #FILEDES ; lo-byte == FILEDES
|
||||
bne @filenotopen
|
||||
txa ; hi-byte == 0
|
||||
beq @fileok ; fd must be == FILEDES
|
||||
|
||||
@filenotopen:
|
||||
lda #EBADF
|
||||
jmp __directerrno ; Sets _errno, clears _oserror, returns -1
|
||||
lda #EBADF
|
||||
jmp __directerrno ; Sets _errno, clears _oserror, returns -1
|
||||
|
||||
@fileok:
|
||||
lda #0
|
||||
sta ptr3
|
||||
sta ptr3+1 ; put 0 into ptr3 (number of bytes read)
|
||||
sta __oserror ; clear error flags
|
||||
jsr __seterrno
|
||||
lda #0
|
||||
sta ptr3
|
||||
sta ptr3+1 ; put 0 into ptr3 (number of bytes read)
|
||||
sta __oserror ; clear error flags
|
||||
jsr __seterrno
|
||||
|
||||
lda f_track ; restore stuff for ReadByte
|
||||
ldx f_sector
|
||||
sta r1L
|
||||
stx r1H
|
||||
lda f_buffer
|
||||
ldx f_buffer+1
|
||||
sta r4L
|
||||
stx r4H
|
||||
lda f_offset
|
||||
ldx f_offset+1
|
||||
sta r5L
|
||||
stx r5H
|
||||
lda f_track ; restore stuff for ReadByte
|
||||
ldx f_sector
|
||||
sta r1L
|
||||
stx r1H
|
||||
lda f_buffer
|
||||
ldx f_buffer+1
|
||||
sta r4L
|
||||
stx r4H
|
||||
lda f_offset
|
||||
ldx f_offset+1
|
||||
sta r5L
|
||||
stx r5H
|
||||
|
||||
clc
|
||||
bcc @L3 ; branch always
|
||||
clc
|
||||
bcc @L3 ; branch always
|
||||
|
||||
@L0: jsr _ReadByte
|
||||
ldy #0 ; store the byte
|
||||
sta (ptr2),y
|
||||
inc ptr2 ; increment target address
|
||||
bne @L1
|
||||
inc ptr2+1
|
||||
@L0: jsr _ReadByte
|
||||
ldy #0 ; store the byte
|
||||
sta (ptr2),y
|
||||
inc ptr2 ; increment target address
|
||||
bne @L1
|
||||
inc ptr2+1
|
||||
|
||||
@L1: inc ptr3 ; increment byte count
|
||||
bne @L2
|
||||
inc ptr3+1
|
||||
@L1: inc ptr3 ; increment byte count
|
||||
bne @L2
|
||||
inc ptr3+1
|
||||
|
||||
@L2: lda __oserror ; was there error ?
|
||||
beq @L3
|
||||
cmp #BFR_OVERFLOW ; EOF?
|
||||
beq @done ; yes, we're done
|
||||
jmp __mappederrno ; no, we're screwed
|
||||
@L2: lda __oserror ; was there error ?
|
||||
beq @L3
|
||||
cmp #BFR_OVERFLOW ; EOF?
|
||||
beq @done ; yes, we're done
|
||||
jmp __mappederrno ; no, we're screwed
|
||||
|
||||
@L3: inc ptr1 ; decrement the count
|
||||
bne @L0
|
||||
inc ptr1+1
|
||||
bne @L0
|
||||
@L3: inc ptr1 ; decrement the count
|
||||
bne @L0
|
||||
inc ptr1+1
|
||||
bne @L0
|
||||
|
||||
@done:
|
||||
lda r1L ; preserve data for ReadByte
|
||||
ldx r1H
|
||||
sta f_track
|
||||
stx f_sector
|
||||
lda r4L
|
||||
ldx r4H
|
||||
sta f_buffer
|
||||
stx f_buffer+1
|
||||
lda r5L
|
||||
ldx r5H
|
||||
sta f_offset
|
||||
stx f_offset+1
|
||||
lda r1L ; preserve data for ReadByte
|
||||
ldx r1H
|
||||
sta f_track
|
||||
stx f_sector
|
||||
lda r4L
|
||||
ldx r4H
|
||||
sta f_buffer
|
||||
stx f_buffer+1
|
||||
lda r5L
|
||||
ldx r5H
|
||||
sta f_offset
|
||||
stx f_offset+1
|
||||
|
||||
lda ptr3 ; return byte count
|
||||
ldx ptr3+1
|
||||
rts
|
||||
lda ptr3 ; return byte count
|
||||
ldx ptr3+1
|
||||
rts
|
||||
|
||||
.bss
|
||||
|
||||
filedesc:
|
||||
.res 1 ; file open flag - 0 (no file opened) or 1
|
||||
.res 1 ; file open flag - 0 (no file opened) or 1
|
||||
f_track:
|
||||
.res 1 ; values preserved for ReadByte
|
||||
.res 1 ; values preserved for ReadByte
|
||||
f_sector:
|
||||
.res 1
|
||||
.res 1
|
||||
f_offset:
|
||||
.res 2
|
||||
.res 2
|
||||
f_buffer:
|
||||
.res 2
|
||||
.res 2
|
||||
|
||||
@@ -5,19 +5,19 @@
|
||||
;
|
||||
; Driver for GEOS standard input device interface
|
||||
;
|
||||
|
||||
.export _mouse_init, _mouse_done
|
||||
.export _mouse_hide, _mouse_show
|
||||
.export _mouse_box
|
||||
.export _mouse_pos, _mouse_info
|
||||
.export _mouse_move, _mouse_buttons
|
||||
|
||||
.export _mouse_init, _mouse_done
|
||||
.export _mouse_hide, _mouse_show
|
||||
.export _mouse_box
|
||||
.export _mouse_pos, _mouse_info
|
||||
.export _mouse_move, _mouse_buttons
|
||||
|
||||
.import popsreg, addysp1
|
||||
.importzp sp, sreg, ptr1
|
||||
.import popsreg, addysp1
|
||||
.importzp sp, sreg, ptr1
|
||||
|
||||
.include "const.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "const.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
;
|
||||
@@ -25,57 +25,57 @@
|
||||
;
|
||||
|
||||
_mouse_init:
|
||||
jsr StartMouseMode
|
||||
jsr MouseOff
|
||||
jsr StartMouseMode
|
||||
jsr MouseOff
|
||||
|
||||
lda #0
|
||||
sta mouseTop
|
||||
sta mouseLeft
|
||||
sta mouseLeft+1
|
||||
lda #0
|
||||
sta mouseTop
|
||||
sta mouseLeft
|
||||
sta mouseLeft+1
|
||||
.ifdef __GEOS_CBM__
|
||||
lda #199
|
||||
sta mouseBottom
|
||||
lda graphMode
|
||||
bpl _mse_screen320
|
||||
lda #199
|
||||
sta mouseBottom
|
||||
lda graphMode
|
||||
bpl _mse_screen320
|
||||
|
||||
lda #<639 ; 80 columns on C128
|
||||
ldx #>639
|
||||
bne _mse_storex
|
||||
lda #<639 ; 80 columns on C128
|
||||
ldx #>639
|
||||
bne _mse_storex
|
||||
_mse_screen320:
|
||||
lda #<319 ; 40 columns on C64/C128
|
||||
ldx #>319
|
||||
lda #<319 ; 40 columns on C64/C128
|
||||
ldx #>319
|
||||
_mse_storex:
|
||||
.else
|
||||
lda #191
|
||||
sta mouseBottom
|
||||
lda #<559
|
||||
ldx #>559
|
||||
lda #191
|
||||
sta mouseBottom
|
||||
lda #<559
|
||||
ldx #>559
|
||||
.endif
|
||||
sta mouseRight
|
||||
stx mouseRight+1
|
||||
sta mouseRight
|
||||
stx mouseRight+1
|
||||
_mse_initend:
|
||||
lda #0
|
||||
tax
|
||||
lda #0
|
||||
tax
|
||||
; --------------------------------------------------------------------------
|
||||
;
|
||||
; void mouse_done (void);
|
||||
;
|
||||
_mouse_done:
|
||||
rts
|
||||
rts
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
;
|
||||
; void mouse_hide (void);
|
||||
;
|
||||
|
||||
_mouse_hide = MouseOff
|
||||
_mouse_hide = MouseOff
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
;
|
||||
; void mouse_show (void);
|
||||
;
|
||||
|
||||
_mouse_show = MouseUp
|
||||
_mouse_show = MouseUp
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
;
|
||||
@@ -83,29 +83,29 @@ _mouse_show = MouseUp
|
||||
;
|
||||
|
||||
_mouse_box:
|
||||
ldy #0 ; Stack offset
|
||||
ldy #0 ; Stack offset
|
||||
|
||||
sta mouseBottom
|
||||
sta mouseBottom
|
||||
|
||||
lda (sp),y
|
||||
sta mouseRight
|
||||
iny
|
||||
lda (sp),y
|
||||
sta mouseRight+1 ; maxx
|
||||
lda (sp),y
|
||||
sta mouseRight
|
||||
iny
|
||||
lda (sp),y
|
||||
sta mouseRight+1 ; maxx
|
||||
|
||||
iny
|
||||
lda (sp),y
|
||||
sta mouseTop
|
||||
iny ; Skip high byte
|
||||
iny
|
||||
lda (sp),y
|
||||
sta mouseTop
|
||||
iny ; Skip high byte
|
||||
|
||||
iny
|
||||
lda (sp),y
|
||||
sta mouseLeft
|
||||
iny
|
||||
lda (sp),y
|
||||
sta mouseLeft+1 ; minx
|
||||
iny
|
||||
lda (sp),y
|
||||
sta mouseLeft
|
||||
iny
|
||||
lda (sp),y
|
||||
sta mouseLeft+1 ; minx
|
||||
|
||||
jmp addysp1 ; Drop params, return
|
||||
jmp addysp1 ; Drop params, return
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
;
|
||||
@@ -114,28 +114,28 @@ _mouse_box:
|
||||
;
|
||||
|
||||
_mouse_pos:
|
||||
sta ptr1
|
||||
stx ptr1+1 ; Remember the argument pointer
|
||||
sta ptr1
|
||||
stx ptr1+1 ; Remember the argument pointer
|
||||
|
||||
ldy #0 ; Structure offset
|
||||
ldy #0 ; Structure offset
|
||||
|
||||
php
|
||||
sei ; Disable interrupts
|
||||
php
|
||||
sei ; Disable interrupts
|
||||
|
||||
lda mouseXPos ; Transfer the position
|
||||
sta (ptr1),y
|
||||
lda mouseXPos+1
|
||||
iny
|
||||
sta (ptr1),y
|
||||
lda mouseYPos
|
||||
iny
|
||||
sta (ptr1),y
|
||||
lda #$00
|
||||
iny
|
||||
sta (ptr1),y
|
||||
lda mouseXPos ; Transfer the position
|
||||
sta (ptr1),y
|
||||
lda mouseXPos+1
|
||||
iny
|
||||
sta (ptr1),y
|
||||
lda mouseYPos
|
||||
iny
|
||||
sta (ptr1),y
|
||||
lda #$00
|
||||
iny
|
||||
sta (ptr1),y
|
||||
|
||||
plp ; Reenable interrupts
|
||||
rts ; Done
|
||||
plp ; Reenable interrupts
|
||||
rts ; Done
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
;
|
||||
@@ -150,15 +150,15 @@ _mouse_info:
|
||||
; call _mouse_pos to initialize the struct pointer and fill the position
|
||||
; fields.
|
||||
|
||||
jsr _mouse_pos
|
||||
jsr _mouse_pos
|
||||
|
||||
; Fill in the button state
|
||||
|
||||
jsr _mouse_buttons ; Will not touch ptr1
|
||||
iny
|
||||
sta (ptr1),y
|
||||
jsr _mouse_buttons ; Will not touch ptr1
|
||||
iny
|
||||
sta (ptr1),y
|
||||
|
||||
rts
|
||||
rts
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
;
|
||||
@@ -166,16 +166,16 @@ _mouse_info:
|
||||
;
|
||||
|
||||
_mouse_move:
|
||||
jsr popsreg ; Get X
|
||||
php
|
||||
sei ; Disable interrupts
|
||||
sta mouseYPos
|
||||
lda sreg
|
||||
ldx sreg+1
|
||||
sta mouseXPos
|
||||
stx mouseXPos+1
|
||||
plp ; Enable interrupts
|
||||
rts
|
||||
jsr popsreg ; Get X
|
||||
php
|
||||
sei ; Disable interrupts
|
||||
sta mouseYPos
|
||||
lda sreg
|
||||
ldx sreg+1
|
||||
sta mouseXPos
|
||||
stx mouseXPos+1
|
||||
plp ; Enable interrupts
|
||||
rts
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
;
|
||||
@@ -183,8 +183,8 @@ _mouse_move:
|
||||
;
|
||||
|
||||
_mouse_buttons:
|
||||
ldx #0
|
||||
lda pressFlag
|
||||
and #SET_MOUSE
|
||||
lsr
|
||||
rts
|
||||
ldx #0
|
||||
lda pressFlag
|
||||
and #SET_MOUSE
|
||||
lsr
|
||||
rts
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
; 2004-09-24, Greg King
|
||||
;
|
||||
|
||||
; .constructor init_pointer
|
||||
; .constructor init_pointer
|
||||
.export _mouse_def_callbacks
|
||||
|
||||
; .include "mouse-kernel.inc"
|
||||
; .include "const.inc"
|
||||
; .include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
; .include "const.inc"
|
||||
; .include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
; .macpack generic
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
; const char mouse_stddrv[];
|
||||
;
|
||||
|
||||
.export _mouse_stddrv
|
||||
.export _mouse_stddrv
|
||||
|
||||
.rodata
|
||||
|
||||
_mouse_stddrv:
|
||||
.asciiz "geos-stdmou.mou"
|
||||
.asciiz "geos-stdmou.mou"
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
; char AppendRecord (void);
|
||||
|
||||
.import setoserror
|
||||
.export _AppendRecord
|
||||
.import setoserror
|
||||
.export _AppendRecord
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
_AppendRecord:
|
||||
|
||||
jsr AppendRecord
|
||||
jmp setoserror
|
||||
jsr AppendRecord
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; char CloseRecordFile (void);
|
||||
|
||||
.import setoserror
|
||||
.export _CloseRecordFile
|
||||
.import setoserror
|
||||
.export _CloseRecordFile
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
_CloseRecordFile:
|
||||
jsr CloseRecordFile
|
||||
jmp setoserror
|
||||
jsr CloseRecordFile
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
|
||||
; char DeleteFile (char *myName);
|
||||
|
||||
.import setoserror
|
||||
.export _DeleteFile
|
||||
.import setoserror
|
||||
.export _DeleteFile
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_DeleteFile:
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr DeleteFile
|
||||
jmp setoserror
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr DeleteFile
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
; char DeleteRecord (void);
|
||||
|
||||
.import setoserror
|
||||
.export _DeleteRecord
|
||||
.import setoserror
|
||||
.export _DeleteRecord
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_DeleteRecord:
|
||||
jsr DeleteRecord
|
||||
jmp setoserror
|
||||
jsr DeleteRecord
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
|
||||
; char FindFile (char *myName);
|
||||
|
||||
.import setoserror
|
||||
.export _FindFile
|
||||
.import setoserror
|
||||
.export _FindFile
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_FindFile:
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr FindFile
|
||||
jmp setoserror
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr FindFile
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,33 +5,33 @@
|
||||
|
||||
; char FindFTypes (char *buffer, char fileType, char fileMax, char *Class);
|
||||
|
||||
.export _FindFTypes
|
||||
.import popax, popa, setoserror
|
||||
.export _FindFTypes
|
||||
.import popax, popa, setoserror
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_FindFTypes:
|
||||
sta r10L
|
||||
stx r10H
|
||||
jsr popa
|
||||
sta r7H
|
||||
sta tmpFileMax
|
||||
jsr popa
|
||||
sta r7L
|
||||
jsr popax
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr FindFTypes
|
||||
jsr setoserror
|
||||
sta r10L
|
||||
stx r10H
|
||||
jsr popa
|
||||
sta r7H
|
||||
sta tmpFileMax
|
||||
jsr popa
|
||||
sta r7L
|
||||
jsr popax
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr FindFTypes
|
||||
jsr setoserror
|
||||
; return (fileMax - r7H)
|
||||
lda tmpFileMax
|
||||
sec
|
||||
sbc r7H
|
||||
rts
|
||||
lda tmpFileMax
|
||||
sec
|
||||
sbc r7H
|
||||
rts
|
||||
|
||||
.bss
|
||||
|
||||
tmpFileMax:
|
||||
.res 1
|
||||
.res 1
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
|
||||
; char FreeFile (struct trse myTrSe[]);
|
||||
|
||||
.import setoserror
|
||||
.export _FreeFile
|
||||
.import setoserror
|
||||
.export _FreeFile
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_FreeFile:
|
||||
sta r9L
|
||||
stx r9H
|
||||
jsr FreeFile
|
||||
jmp setoserror
|
||||
sta r9L
|
||||
stx r9H
|
||||
jsr FreeFile
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
|
||||
; struct filehandle* Get1stDirEntry (void);
|
||||
|
||||
.import __oserror
|
||||
.export _Get1stDirEntry
|
||||
.import __oserror
|
||||
.export _Get1stDirEntry
|
||||
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_Get1stDirEntry:
|
||||
jsr Get1stDirEntry
|
||||
stx __oserror
|
||||
lda r5L
|
||||
ldx r5H
|
||||
rts
|
||||
jsr Get1stDirEntry
|
||||
stx __oserror
|
||||
lda r5L
|
||||
ldx r5H
|
||||
rts
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
|
||||
; char GetFHdrInfo (struct filehandle *myFile);
|
||||
|
||||
.import setoserror
|
||||
.export _GetFHdrInfo
|
||||
.import setoserror
|
||||
.export _GetFHdrInfo
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_GetFHdrInfo:
|
||||
sta r9L
|
||||
stx r9H
|
||||
jsr GetFHdrInfo
|
||||
jmp setoserror
|
||||
sta r9L
|
||||
stx r9H
|
||||
jsr GetFHdrInfo
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,28 +5,28 @@
|
||||
|
||||
; char __fastcall__ GetFile(char flag, const char *fname, const char *loadaddr, const char *datadname, char *datafname);
|
||||
|
||||
.export _GetFile
|
||||
.import popa, popax, setoserror
|
||||
.export _GetFile
|
||||
.import popa, popax, setoserror
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_GetFile:
|
||||
sta r3L
|
||||
stx r3H
|
||||
jsr popax
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r7L
|
||||
stx r7H
|
||||
jsr popax
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr popa
|
||||
sta r0L
|
||||
lda #0
|
||||
sta r10L
|
||||
jsr GetFile
|
||||
jmp setoserror
|
||||
sta r3L
|
||||
stx r3H
|
||||
jsr popax
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r7L
|
||||
stx r7H
|
||||
jsr popax
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr popa
|
||||
sta r0L
|
||||
lda #0
|
||||
sta r10L
|
||||
jsr GetFile
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
|
||||
; struct filehandle* GetNxtDirEntry (void);
|
||||
|
||||
.import __oserror
|
||||
.export _GetNxtDirEntry
|
||||
.import __oserror
|
||||
.export _GetNxtDirEntry
|
||||
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_GetNxtDirEntry:
|
||||
jsr GetNxtDirEntry
|
||||
stx __oserror
|
||||
lda r5L
|
||||
ldx r5H
|
||||
rts
|
||||
jsr GetNxtDirEntry
|
||||
stx __oserror
|
||||
lda r5L
|
||||
ldx r5H
|
||||
rts
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; char InsertRecord (void);
|
||||
|
||||
.import setoserror
|
||||
.export _InsertRecord
|
||||
.import setoserror
|
||||
.export _InsertRecord
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
_InsertRecord:
|
||||
jsr InsertRecord
|
||||
jmp setoserror
|
||||
jsr InsertRecord
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; char NextRecord (void);
|
||||
|
||||
.import setoserror
|
||||
.export _NextRecord
|
||||
.import setoserror
|
||||
.export _NextRecord
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
_NextRecord:
|
||||
jsr NextRecord
|
||||
jmp setoserror
|
||||
jsr NextRecord
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
|
||||
; char OpenRecordFile (char *myName);
|
||||
|
||||
.import setoserror
|
||||
.export _OpenRecordFile
|
||||
.import setoserror
|
||||
.export _OpenRecordFile
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_OpenRecordFile:
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr OpenRecordFile
|
||||
jmp setoserror
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr OpenRecordFile
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; char PointRecord (char recordNum);
|
||||
|
||||
.import setoserror
|
||||
.export _PointRecord
|
||||
.import setoserror
|
||||
.export _PointRecord
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
_PointRecord:
|
||||
jsr PointRecord
|
||||
jmp setoserror
|
||||
jsr PointRecord
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; char PreviousRecord (void);
|
||||
|
||||
.import setoserror
|
||||
.export _PreviousRecord
|
||||
.import setoserror
|
||||
.export _PreviousRecord
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
_PreviousRecord:
|
||||
jsr PreviousRecord
|
||||
jmp setoserror
|
||||
jsr PreviousRecord
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
; char ReadByte (void);
|
||||
|
||||
.import __oserror
|
||||
.export _ReadByte
|
||||
.import __oserror
|
||||
.export _ReadByte
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_ReadByte:
|
||||
jsr ReadByte
|
||||
stx __oserror
|
||||
ldx #0
|
||||
rts
|
||||
jsr ReadByte
|
||||
stx __oserror
|
||||
ldx #0
|
||||
rts
|
||||
|
||||
@@ -5,23 +5,23 @@
|
||||
|
||||
; char ReadFile (struct tr_se *myTS, char *buffer, int length);
|
||||
|
||||
.export _ReadFile
|
||||
.import popax, setoserror
|
||||
.import gettrse
|
||||
.export _ReadFile
|
||||
.import popax, setoserror
|
||||
.import gettrse
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_ReadFile:
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r7L
|
||||
stx r7H
|
||||
jsr popax
|
||||
jsr gettrse
|
||||
sta r1L
|
||||
stx r1H
|
||||
jsr ReadFile
|
||||
jmp setoserror
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r7L
|
||||
stx r7H
|
||||
jsr popax
|
||||
jsr gettrse
|
||||
sta r1L
|
||||
stx r1H
|
||||
jsr ReadFile
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
|
||||
; char ReadRecord (char *buffer, int length);
|
||||
|
||||
.export _ReadRecord
|
||||
.import popax, setoserror
|
||||
.export _ReadRecord
|
||||
.import popax, setoserror
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_ReadRecord:
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r7L
|
||||
stx r7H
|
||||
jsr ReadRecord
|
||||
jmp setoserror
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r7L
|
||||
stx r7H
|
||||
jsr ReadRecord
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
|
||||
; char RenameFile (char *old, char *new);
|
||||
|
||||
.export _RenameFile
|
||||
.import popax, setoserror
|
||||
.export _RenameFile
|
||||
.import popax, setoserror
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_RenameFile:
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr popax
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr RenameFile
|
||||
jmp setoserror
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr popax
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr RenameFile
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
|
||||
; char SaveFile (char skip, struct fileheader *myHeader);
|
||||
|
||||
.import setoserror
|
||||
.import popa
|
||||
.export _SaveFile
|
||||
.import setoserror
|
||||
.import popa
|
||||
.export _SaveFile
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_SaveFile:
|
||||
sta r9L
|
||||
stx r9H
|
||||
jsr popa
|
||||
sta r10L
|
||||
jsr SaveFile
|
||||
jmp setoserror
|
||||
sta r9L
|
||||
stx r9H
|
||||
jsr popa
|
||||
sta r10L
|
||||
jsr SaveFile
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
|
||||
; unsigned char __fastcall__ _sysremove (const char* name);
|
||||
|
||||
.export __sysremove
|
||||
.export __sysremove
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
__sysremove:
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr DeleteFile
|
||||
txa
|
||||
ldx #0
|
||||
rts
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr DeleteFile
|
||||
txa
|
||||
ldx #0
|
||||
rts
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
|
||||
; unsigned char __fastcall__ _sysrename (const char* oldname, const char* newname);
|
||||
|
||||
.export __sysrename
|
||||
.import popax
|
||||
.export __sysrename
|
||||
.import popax
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
__sysrename:
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr popax
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr RenameFile
|
||||
txa
|
||||
ldx #0
|
||||
rts
|
||||
sta r0L
|
||||
stx r0H
|
||||
jsr popax
|
||||
sta r6L
|
||||
stx r6H
|
||||
jsr RenameFile
|
||||
txa
|
||||
ldx #0
|
||||
rts
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; char UpdateRecordFile (void);
|
||||
|
||||
.import setoserror
|
||||
.export _UpdateRecordFile
|
||||
.import setoserror
|
||||
.export _UpdateRecordFile
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
|
||||
_UpdateRecordFile:
|
||||
jsr UpdateRecordFile
|
||||
jmp setoserror
|
||||
jsr UpdateRecordFile
|
||||
jmp setoserror
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
|
||||
; char WriteRecord (char *buffer, int length);
|
||||
|
||||
.export _WriteRecord
|
||||
.import popax, setoserror
|
||||
.export _WriteRecord
|
||||
.import popax, setoserror
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "diskdrv.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_WriteRecord:
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r7L
|
||||
stx r7H
|
||||
jsr WriteRecord
|
||||
jmp setoserror
|
||||
sta r2L
|
||||
stx r2H
|
||||
jsr popax
|
||||
sta r7L
|
||||
stx r7H
|
||||
jsr WriteRecord
|
||||
jmp setoserror
|
||||
|
||||
@@ -8,281 +8,281 @@
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro LoadB dest, value
|
||||
lda #value
|
||||
sta dest
|
||||
.macro LoadB dest, value
|
||||
lda #value
|
||||
sta dest
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro LoadW dest, value
|
||||
LoadB dest+1, >(value)
|
||||
LoadB dest+0, <(value)
|
||||
.macro LoadW dest, value
|
||||
LoadB dest+1, >(value)
|
||||
LoadB dest+0, <(value)
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro MoveB source, dest
|
||||
lda source
|
||||
sta dest
|
||||
.macro MoveB source, dest
|
||||
lda source
|
||||
sta dest
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro MoveW source, dest
|
||||
MoveB source+1, dest+1
|
||||
MoveB source+0, dest+0
|
||||
.macro MoveW source, dest
|
||||
MoveB source+1, dest+1
|
||||
MoveB source+0, dest+0
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro add source
|
||||
clc
|
||||
adc source
|
||||
.macro add source
|
||||
clc
|
||||
adc source
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro AddB source, dest
|
||||
lda source
|
||||
add dest
|
||||
sta dest
|
||||
.macro AddB source, dest
|
||||
lda source
|
||||
add dest
|
||||
sta dest
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro AddW source, dest
|
||||
AddB source+0, dest+0
|
||||
lda source+1
|
||||
adc dest+1
|
||||
sta dest+1
|
||||
.macro AddW source, dest
|
||||
AddB source+0, dest+0
|
||||
lda source+1
|
||||
adc dest+1
|
||||
sta dest+1
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro AddVB value, dest
|
||||
lda dest
|
||||
clc
|
||||
adc #(value)
|
||||
sta dest
|
||||
.endmacro
|
||||
.macro AddVB value, dest
|
||||
lda dest
|
||||
clc
|
||||
adc #(value)
|
||||
sta dest
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro AddVW value, dest
|
||||
.macro AddVW value, dest
|
||||
.local Skip
|
||||
AddVB <(value), dest+0
|
||||
.if (>(value))=0
|
||||
bcc Skip
|
||||
inc dest+1
|
||||
.else
|
||||
lda #>(value)
|
||||
adc dest+1
|
||||
sta dest+1
|
||||
.endif
|
||||
AddVB <(value), dest+0
|
||||
.if (>(value))=0
|
||||
bcc Skip
|
||||
inc dest+1
|
||||
.else
|
||||
lda #>(value)
|
||||
adc dest+1
|
||||
sta dest+1
|
||||
.endif
|
||||
Skip:
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro ssub source
|
||||
sec
|
||||
sbc source
|
||||
.macro ssub source
|
||||
sec
|
||||
sbc source
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro SubB source, dest
|
||||
lda dest
|
||||
ssub source
|
||||
sta dest
|
||||
.macro SubB source, dest
|
||||
lda dest
|
||||
ssub source
|
||||
sta dest
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro SubW source, dest
|
||||
SubB source+0, dest+0
|
||||
lda dest+1
|
||||
sbc source+1
|
||||
sta dest+1
|
||||
.macro SubW source, dest
|
||||
SubB source+0, dest+0
|
||||
lda dest+1
|
||||
sbc source+1
|
||||
sta dest+1
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro SubVW value, dest
|
||||
sec
|
||||
lda dest+0
|
||||
sbc #<(value)
|
||||
sta dest+0
|
||||
lda dest+1
|
||||
sbc #>(value)
|
||||
sta dest+1
|
||||
.macro SubVW value, dest
|
||||
sec
|
||||
lda dest+0
|
||||
sbc #<(value)
|
||||
sta dest+0
|
||||
lda dest+1
|
||||
sbc #>(value)
|
||||
sta dest+1
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro CmpB source, dest
|
||||
lda source
|
||||
cmp dest
|
||||
.macro CmpB source, dest
|
||||
lda source
|
||||
cmp dest
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro CmpBI source, immed
|
||||
lda source
|
||||
cmp #(immed)
|
||||
.macro CmpBI source, immed
|
||||
lda source
|
||||
cmp #(immed)
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro CmpW source, dest
|
||||
.local Skip
|
||||
CmpB source+1, dest+1
|
||||
bne Skip
|
||||
CmpB source+0, dest+0
|
||||
.macro CmpW source, dest
|
||||
.local Skip
|
||||
CmpB source+1, dest+1
|
||||
bne Skip
|
||||
CmpB source+0, dest+0
|
||||
Skip:
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro CmpWI source, immed
|
||||
.macro CmpWI source, immed
|
||||
.local Skip
|
||||
CmpBI source+1, >(immed)
|
||||
bne Skip
|
||||
CmpBI source+0, <(immed)
|
||||
CmpBI source+1, >(immed)
|
||||
bne Skip
|
||||
CmpBI source+0, <(immed)
|
||||
Skip:
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro PushB source
|
||||
lda source
|
||||
pha
|
||||
.macro PushB source
|
||||
lda source
|
||||
pha
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro PushW source
|
||||
PushB source+1
|
||||
PushB source+0
|
||||
.macro PushW source
|
||||
PushB source+1
|
||||
PushB source+0
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro PopB dest
|
||||
pla
|
||||
sta dest
|
||||
.macro PopB dest
|
||||
pla
|
||||
sta dest
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro PopW dest
|
||||
PopB dest+0
|
||||
PopB dest+1
|
||||
.macro PopW dest
|
||||
PopB dest+0
|
||||
PopB dest+1
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro smb bitNumber, dest
|
||||
pha
|
||||
lda #(1 << bitNumber)
|
||||
ora dest
|
||||
sta dest
|
||||
pla
|
||||
.macro smb bitNumber, dest
|
||||
pha
|
||||
lda #(1 << bitNumber)
|
||||
ora dest
|
||||
sta dest
|
||||
pla
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro smbf bitNumber, dest
|
||||
lda #(1 << bitNumber)
|
||||
ora dest
|
||||
sta dest
|
||||
.macro smbf bitNumber, dest
|
||||
lda #(1 << bitNumber)
|
||||
ora dest
|
||||
sta dest
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro rmb bitNumber, dest
|
||||
pha
|
||||
lda #(1 << bitNumber) ^ $ff
|
||||
and dest
|
||||
sta dest
|
||||
pla
|
||||
.macro rmb bitNumber, dest
|
||||
pha
|
||||
lda #(1 << bitNumber) ^ $ff
|
||||
and dest
|
||||
sta dest
|
||||
pla
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro rmbf bitNumber, dest
|
||||
lda #(1 << bitNumber) ^ $ff
|
||||
and dest
|
||||
sta dest
|
||||
.macro rmbf bitNumber, dest
|
||||
lda #(1 << bitNumber) ^ $ff
|
||||
and dest
|
||||
sta dest
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro bbs bitNumber, source, addr
|
||||
.macro bbs bitNumber, source, addr
|
||||
.local Skip
|
||||
php
|
||||
pha
|
||||
lda source
|
||||
and #(1 << bitNumber)
|
||||
beq Skip
|
||||
pla
|
||||
plp
|
||||
bra addr
|
||||
Skip: pla
|
||||
plp
|
||||
php
|
||||
pha
|
||||
lda source
|
||||
and #(1 << bitNumber)
|
||||
beq Skip
|
||||
pla
|
||||
plp
|
||||
bra addr
|
||||
Skip: pla
|
||||
plp
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro bbsf bitNumber, source, addr
|
||||
.if bitNumber=7
|
||||
bit source
|
||||
bmi addr
|
||||
.else
|
||||
.if bitNumber=6
|
||||
bit source
|
||||
bvs addr
|
||||
.else
|
||||
lda source
|
||||
and #(1 << bitNumber)
|
||||
bne addr
|
||||
.endif
|
||||
.endif
|
||||
.macro bbsf bitNumber, source, addr
|
||||
.if bitNumber=7
|
||||
bit source
|
||||
bmi addr
|
||||
.else
|
||||
.if bitNumber=6
|
||||
bit source
|
||||
bvs addr
|
||||
.else
|
||||
lda source
|
||||
and #(1 << bitNumber)
|
||||
bne addr
|
||||
.endif
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro bbr bitNumber, source, addr
|
||||
.macro bbr bitNumber, source, addr
|
||||
.local Skip
|
||||
php
|
||||
pha
|
||||
lda source
|
||||
and #(1 << bitNumber)
|
||||
bne Skip
|
||||
pla
|
||||
plp
|
||||
bra addr
|
||||
Skip: pla
|
||||
plp
|
||||
php
|
||||
pha
|
||||
lda source
|
||||
and #(1 << bitNumber)
|
||||
bne Skip
|
||||
pla
|
||||
plp
|
||||
bra addr
|
||||
Skip: pla
|
||||
plp
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro bbrf bitNumber, source, addr
|
||||
.if bitNumber=7
|
||||
bit source
|
||||
bpl addr
|
||||
.else
|
||||
.if bitNumber=6
|
||||
bit source
|
||||
bvc addr
|
||||
.else
|
||||
lda source
|
||||
and #(1 << bitNumber)
|
||||
beq addr
|
||||
.endif
|
||||
.endif
|
||||
.macro bbrf bitNumber, source, addr
|
||||
.if bitNumber=7
|
||||
bit source
|
||||
bpl addr
|
||||
.else
|
||||
.if bitNumber=6
|
||||
bit source
|
||||
bvc addr
|
||||
.else
|
||||
lda source
|
||||
and #(1 << bitNumber)
|
||||
beq addr
|
||||
.endif
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
@@ -291,30 +291,30 @@ Skip: pla
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro addv value
|
||||
clc
|
||||
adc #(value)
|
||||
.macro addv value
|
||||
clc
|
||||
adc #(value)
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro subv value
|
||||
sec
|
||||
sbc #(value)
|
||||
.macro subv value
|
||||
sec
|
||||
sbc #(value)
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro bnex addr
|
||||
txa
|
||||
bne addr
|
||||
.macro bnex addr
|
||||
txa
|
||||
bne addr
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
.macro beqx addr
|
||||
txa
|
||||
beq addr
|
||||
.macro beqx addr
|
||||
txa
|
||||
beq addr
|
||||
.endmacro
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
;
|
||||
; 21.12.99
|
||||
|
||||
; void BitmapClip (char skipl, char skipr, int skipy, struct iconpic *myGfx);
|
||||
; void BitmapClip (char skipl, char skipr, int skipy, struct iconpic *myGfx);
|
||||
|
||||
.import popa, popax
|
||||
.import BitmapRegs
|
||||
.export _BitmapClip
|
||||
.import popa, popax
|
||||
.import BitmapRegs
|
||||
.export _BitmapClip
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_BitmapClip:
|
||||
jsr BitmapRegs
|
||||
jsr popax
|
||||
sta r12L
|
||||
stx r12H
|
||||
jsr popa
|
||||
sta r11H
|
||||
jsr popa
|
||||
sta r11L
|
||||
jmp BitmapClip
|
||||
jsr BitmapRegs
|
||||
jsr popax
|
||||
sta r12L
|
||||
stx r12H
|
||||
jsr popa
|
||||
sta r11H
|
||||
jsr popa
|
||||
sta r11L
|
||||
jmp BitmapClip
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
;
|
||||
; 21.12.99
|
||||
|
||||
.importzp ptr4
|
||||
.export BitmapRegs
|
||||
.importzp ptr4
|
||||
.export BitmapRegs
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
BitmapRegs: ; a/x is a struct iconpic*
|
||||
sta ptr4
|
||||
stx ptr4+1
|
||||
ldy #0
|
||||
bmpLp: lda (ptr4),y
|
||||
sta r0L,y
|
||||
iny
|
||||
cpy #6
|
||||
bne bmpLp
|
||||
rts
|
||||
BitmapRegs: ; a/x is a struct iconpic*
|
||||
sta ptr4
|
||||
stx ptr4+1
|
||||
ldy #0
|
||||
bmpLp: lda (ptr4),y
|
||||
sta r0L,y
|
||||
iny
|
||||
cpy #6
|
||||
bne bmpLp
|
||||
rts
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
;
|
||||
; 21.12.99
|
||||
|
||||
; void BitmapUp (struct iconpic *myGfx);
|
||||
; void BitmapUp (struct iconpic *myGfx);
|
||||
|
||||
.import BitmapRegs
|
||||
.export _BitmapUp
|
||||
.import BitmapRegs
|
||||
.export _BitmapUp
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_BitmapUp:
|
||||
jsr BitmapRegs
|
||||
jmp BitmapUp
|
||||
jsr BitmapRegs
|
||||
jmp BitmapUp
|
||||
|
||||
@@ -3,34 +3,34 @@
|
||||
;
|
||||
; 21.12.99
|
||||
|
||||
; void BitOtherClip (void *proc1, void* proc2, char skipl, char skipr, int skipy,
|
||||
; struct iconpic *myGfx);
|
||||
; void BitOtherClip (void *proc1, void* proc2, char skipl, char skipr, int skipy,
|
||||
; struct iconpic *myGfx);
|
||||
|
||||
; both proc1, proc2 should be: char __fastcall something (void);
|
||||
; proc1 is called before reading a byte (.A returns next data)
|
||||
; proc2 is called before reading each byte which is not pattern (code >219)
|
||||
; proc1 is called before reading a byte (.A returns next data)
|
||||
; proc2 is called before reading each byte which is not pattern (code >219)
|
||||
|
||||
|
||||
.import popa, popax
|
||||
.import BitOtherRegs
|
||||
.export _BitOtherClip
|
||||
.import popa, popax
|
||||
.import BitOtherRegs
|
||||
.export _BitOtherClip
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_BitOtherClip:
|
||||
jsr BitOtherRegs
|
||||
jsr popax
|
||||
sta r12L
|
||||
stx r12H
|
||||
jsr popa
|
||||
sta r11H
|
||||
jsr popa
|
||||
sta r11L
|
||||
jsr popax
|
||||
sta r14L
|
||||
stx r14H
|
||||
jsr popax
|
||||
sta r13L
|
||||
stx r13H
|
||||
jmp BitOtherClip
|
||||
jsr BitOtherRegs
|
||||
jsr popax
|
||||
sta r12L
|
||||
stx r12H
|
||||
jsr popa
|
||||
sta r11H
|
||||
jsr popa
|
||||
sta r11L
|
||||
jsr popax
|
||||
sta r14L
|
||||
stx r14H
|
||||
jsr popax
|
||||
sta r13L
|
||||
stx r13H
|
||||
jmp BitOtherClip
|
||||
|
||||
@@ -5,26 +5,26 @@
|
||||
|
||||
; void DrawLine (char mode, struct window *mywindow);
|
||||
|
||||
.import _InitDrawWindow
|
||||
.import popa
|
||||
.importzp tmp1
|
||||
.export _DrawLine
|
||||
.import _InitDrawWindow
|
||||
.import popa
|
||||
.importzp tmp1
|
||||
.export _DrawLine
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "geosmac.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "geosmac.inc"
|
||||
|
||||
_DrawLine:
|
||||
tay
|
||||
PushW r2
|
||||
tya
|
||||
jsr _InitDrawWindow
|
||||
MoveW r2, r11
|
||||
PopW r2
|
||||
jsr popa
|
||||
sta tmp1
|
||||
clc
|
||||
bit tmp1
|
||||
bvc @1
|
||||
sec
|
||||
@1: jmp DrawLine
|
||||
tay
|
||||
PushW r2
|
||||
tya
|
||||
jsr _InitDrawWindow
|
||||
MoveW r2, r11
|
||||
PopW r2
|
||||
jsr popa
|
||||
sta tmp1
|
||||
clc
|
||||
bit tmp1
|
||||
bvc @1
|
||||
sec
|
||||
@1: jmp DrawLine
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
;
|
||||
; 29.10.99, 05.3.2003
|
||||
|
||||
; void DrawPoint (char mode, struct pixel *mypixel);
|
||||
; void DrawPoint (char mode, struct pixel *mypixel);
|
||||
|
||||
.import PointRegs
|
||||
.import popa
|
||||
.importzp tmp1
|
||||
.export _DrawPoint
|
||||
.import PointRegs
|
||||
.import popa
|
||||
.importzp tmp1
|
||||
.export _DrawPoint
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_DrawPoint:
|
||||
jsr PointRegs
|
||||
jsr popa
|
||||
sta tmp1
|
||||
clc
|
||||
bit tmp1
|
||||
bvc @1
|
||||
sec
|
||||
@1: jmp DrawPoint
|
||||
jsr PointRegs
|
||||
jsr popa
|
||||
sta tmp1
|
||||
clc
|
||||
bit tmp1
|
||||
bvc @1
|
||||
sec
|
||||
@1: jmp DrawPoint
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
; void FrameRectangle (char pattern);
|
||||
|
||||
.export _FrameRectangle
|
||||
.export _FrameRectangle
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_FrameRectangle = FrameRectangle
|
||||
.include "jumptab.inc"
|
||||
|
||||
_FrameRectangle = FrameRectangle
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
; char GetCharWidth (char character);
|
||||
|
||||
.export _GetCharWidth
|
||||
.export _GetCharWidth
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_GetCharWidth:
|
||||
jsr GetCharWidth
|
||||
ldx #0
|
||||
rts
|
||||
jsr GetCharWidth
|
||||
ldx #0
|
||||
rts
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
;
|
||||
; 11.03.2000
|
||||
|
||||
.import popa, popax
|
||||
.export getintcharint
|
||||
.import popa, popax
|
||||
.export getintcharint
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
getintcharint:
|
||||
sta r11L
|
||||
stx r11H
|
||||
jsr popa
|
||||
sta r1H
|
||||
jsr popax
|
||||
sta r0L
|
||||
stx r0H
|
||||
rts
|
||||
sta r11L
|
||||
stx r11H
|
||||
jsr popa
|
||||
sta r1H
|
||||
jsr popax
|
||||
sta r0L
|
||||
stx r0H
|
||||
rts
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; void GraphicsString (char *myString);
|
||||
|
||||
.export _GraphicsString
|
||||
.export _GraphicsString
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_GraphicsString:
|
||||
sta r0L
|
||||
stx r0H
|
||||
jmp GraphicsString
|
||||
sta r0L
|
||||
stx r0H
|
||||
jmp GraphicsString
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
; 29.10.99
|
||||
|
||||
|
||||
.import popax, popa
|
||||
.export HLineRegs
|
||||
.import popax, popa
|
||||
.export HLineRegs
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
HLineRegs:
|
||||
stx r4H
|
||||
sta r4L
|
||||
jsr popax
|
||||
stx r3H
|
||||
sta r3L
|
||||
jsr popa
|
||||
sta r11L
|
||||
rts
|
||||
stx r4H
|
||||
sta r4L
|
||||
jsr popax
|
||||
stx r3H
|
||||
sta r3L
|
||||
jsr popa
|
||||
sta r11L
|
||||
rts
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
; void HorizontalLine (char pattern, char y, int xstart, int xend);
|
||||
|
||||
.import popa
|
||||
.import HLineRegs
|
||||
.export _HorizontalLine
|
||||
.import popa
|
||||
.import HLineRegs
|
||||
.export _HorizontalLine
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_HorizontalLine:
|
||||
jsr HLineRegs
|
||||
jsr popa
|
||||
jmp HorizontalLine
|
||||
jsr HLineRegs
|
||||
jsr popa
|
||||
jmp HorizontalLine
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
; 21.12.99
|
||||
|
||||
; void ImprintRectangle (void);
|
||||
|
||||
.export _ImprintRectangle
|
||||
|
||||
.export _ImprintRectangle
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_ImprintRectangle = ImprintRectangle
|
||||
|
||||
|
||||
@@ -6,18 +6,18 @@
|
||||
|
||||
; void InitDrawWindow (struct window *myWindow);
|
||||
|
||||
.importzp ptr4
|
||||
.export _InitDrawWindow
|
||||
.importzp ptr4
|
||||
.export _InitDrawWindow
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_InitDrawWindow: ; a/x is a struct window*
|
||||
sta ptr4
|
||||
stx ptr4+1
|
||||
ldy #0
|
||||
_InitDrawWindow: ; a/x is a struct window*
|
||||
sta ptr4
|
||||
stx ptr4+1
|
||||
ldy #0
|
||||
copyWin:lda (ptr4),y
|
||||
sta r2L,y
|
||||
iny
|
||||
cpy #6
|
||||
bne copyWin
|
||||
rts
|
||||
sta r2L,y
|
||||
iny
|
||||
cpy #6
|
||||
bne copyWin
|
||||
rts
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
; void InvertLine (char y, int xstart, int xend);
|
||||
|
||||
.import HLineRegs
|
||||
.export _InvertLine
|
||||
.import HLineRegs
|
||||
.export _InvertLine
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_InvertLine:
|
||||
jsr HLineRegs
|
||||
jmp InvertLine
|
||||
jsr HLineRegs
|
||||
jmp InvertLine
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
; void InvertRectangle (void);
|
||||
|
||||
.export _InvertRectangle
|
||||
|
||||
.include "jumptab.inc"
|
||||
.export _InvertRectangle
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_InvertRectangle = InvertRectangle
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; void LoadCharSet (struct fontdesc *myFont);
|
||||
|
||||
.export _LoadCharSet
|
||||
.export _LoadCharSet
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_LoadCharSet:
|
||||
sta r0L
|
||||
stx r0H
|
||||
jmp LoadCharSet
|
||||
sta r0L
|
||||
stx r0H
|
||||
jmp LoadCharSet
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
;
|
||||
; 29.10.99
|
||||
|
||||
.importzp ptr4
|
||||
.export PointRegs
|
||||
.importzp ptr4
|
||||
.export PointRegs
|
||||
|
||||
.include "geossym.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
PointRegs: ; a/x is a struct pixel*
|
||||
sta ptr4
|
||||
stx ptr4+1
|
||||
ldy #0
|
||||
lda (ptr4),y
|
||||
sta r3L
|
||||
iny
|
||||
lda (ptr4),y
|
||||
sta r3H
|
||||
iny
|
||||
lda (ptr4),y
|
||||
sta r11L
|
||||
rts
|
||||
PointRegs: ; a/x is a struct pixel*
|
||||
sta ptr4
|
||||
stx ptr4+1
|
||||
ldy #0
|
||||
lda (ptr4),y
|
||||
sta r3L
|
||||
iny
|
||||
lda (ptr4),y
|
||||
sta r3H
|
||||
iny
|
||||
lda (ptr4),y
|
||||
sta r11L
|
||||
rts
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
|
||||
; void PutChar (char character, char y, int x);
|
||||
|
||||
.import popa
|
||||
.export _PutChar
|
||||
.import popa
|
||||
.export _PutChar
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_PutChar:
|
||||
sta r11L
|
||||
stx r11H
|
||||
jsr popa
|
||||
sta r1H
|
||||
jsr popa
|
||||
jmp PutChar
|
||||
sta r11L
|
||||
stx r11H
|
||||
jsr popa
|
||||
sta r1H
|
||||
jsr popa
|
||||
jmp PutChar
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
; void PutDecimal (char style, unsigned value, char y, int x);
|
||||
|
||||
.import popa, popax
|
||||
.import getintcharint
|
||||
.export _PutDecimal
|
||||
.import popa, popax
|
||||
.import getintcharint
|
||||
.export _PutDecimal
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_PutDecimal:
|
||||
jsr getintcharint
|
||||
jsr popa
|
||||
jmp PutDecimal
|
||||
jsr getintcharint
|
||||
jsr popa
|
||||
jmp PutDecimal
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
;
|
||||
; 30.10.99
|
||||
|
||||
; void PutString (char *mytxt, char y, int x);
|
||||
; void PutString (char *mytxt, char y, int x);
|
||||
|
||||
.import popax, popa
|
||||
.import getintcharint
|
||||
.export _PutString
|
||||
.import popax, popa
|
||||
.import getintcharint
|
||||
.export _PutString
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_PutString:
|
||||
jsr getintcharint
|
||||
jmp PutString
|
||||
jsr getintcharint
|
||||
jmp PutString
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
; void RecoverLine (char y, int xstart, int xend);
|
||||
|
||||
.import HLineRegs
|
||||
.export _RecoverLine
|
||||
|
||||
.include "jumptab.inc"
|
||||
.import HLineRegs
|
||||
.export _RecoverLine
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_RecoverLine:
|
||||
jsr HLineRegs
|
||||
jmp RecoverLine
|
||||
jsr HLineRegs
|
||||
jmp RecoverLine
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
; 29.10.99
|
||||
|
||||
; void RecoverRectangle (void);
|
||||
|
||||
.export _RecoverRectangle
|
||||
|
||||
.export _RecoverRectangle
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_RecoverRectangle = RecoverRectangle
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
; void Rectangle (void);
|
||||
|
||||
.export _Rectangle
|
||||
|
||||
.include "jumptab.inc"
|
||||
.export _Rectangle
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_Rectangle = Rectangle
|
||||
_Rectangle = Rectangle
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
; void SetPattern (char pattern);
|
||||
|
||||
.export _SetPattern
|
||||
.export _SetPattern
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_SetPattern = SetPattern
|
||||
_SetPattern = SetPattern
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
;
|
||||
; 29.10.1999, 2.1.2003
|
||||
|
||||
; char TestPoint (struct pixel *mypixel);
|
||||
; char TestPoint (struct pixel *mypixel);
|
||||
|
||||
.import PointRegs
|
||||
.import return0, return1
|
||||
.export _TestPoint
|
||||
.import PointRegs
|
||||
.import return0, return1
|
||||
.export _TestPoint
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_TestPoint:
|
||||
jsr PointRegs
|
||||
jsr TestPoint
|
||||
bcc goFalse
|
||||
jmp return1
|
||||
jsr PointRegs
|
||||
jsr TestPoint
|
||||
bcc goFalse
|
||||
jmp return1
|
||||
goFalse:jmp return0
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
; void UseSystemFont (void);
|
||||
|
||||
.export _UseSystemFont
|
||||
.export _UseSystemFont
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_UseSystemFont = UseSystemFont
|
||||
_UseSystemFont = UseSystemFont
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
|
||||
; void VerticalLine (char pattern, char ystart, char yend, int x);
|
||||
|
||||
.import popa
|
||||
.export _VerticalLine
|
||||
.import popa
|
||||
.export _VerticalLine
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_VerticalLine:
|
||||
stx r4H
|
||||
sta r4L
|
||||
jsr popa
|
||||
sta r3H
|
||||
jsr popa
|
||||
sta r3L
|
||||
jsr popa
|
||||
jmp VerticalLine
|
||||
stx r4H
|
||||
sta r4L
|
||||
jsr popa
|
||||
sta r3H
|
||||
jsr popa
|
||||
sta r3L
|
||||
jsr popa
|
||||
jmp VerticalLine
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
|
||||
; void * ClearRam (char *dest, int length);
|
||||
|
||||
.import DoublePop
|
||||
.export _ClearRam
|
||||
.import DoublePop
|
||||
.export _ClearRam
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_ClearRam:
|
||||
jsr DoublePop
|
||||
pha
|
||||
txa
|
||||
pha
|
||||
jsr ClearRam
|
||||
pla
|
||||
tax
|
||||
pla
|
||||
rts
|
||||
jsr DoublePop
|
||||
pha
|
||||
txa
|
||||
pha
|
||||
jsr ClearRam
|
||||
pla
|
||||
tax
|
||||
pla
|
||||
rts
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user