fix codestyle

This commit is contained in:
Konstantin
2025-06-08 23:20:21 +03:00
parent 34daf33d93
commit 41a82f7165
6 changed files with 38 additions and 11 deletions

17
libsrc/agat/_scrsize.s Normal file
View File

@@ -0,0 +1,17 @@
;
; Ullrich von Bassewitz, 26.10.2000
;
; Screen size variables
;
.export screensize
.include "agat.inc"
screensize:
ldx WNDWDTH
lda WNDBTM
sec
sbc WNDTOP
tay
rts

View File

@@ -11,7 +11,8 @@
_cclear:
sta ptr1
lda #$A0
next: jsr COUT
next:
jsr COUT
dec ptr1
bne next
rts

View File

@@ -13,7 +13,8 @@ _cgetc:
bit cursor
bne hascur
lda #$00
hascur: sta CURSOR
hascur:
sta CURSOR
jsr j1
cmp #$A0
bpl :+

View File

@@ -20,7 +20,8 @@ _cputc:
ldy #$00
sty CH
rts
notleft:cmp #$0A
notleft:
cmp #$0A
beq newline
putchar:
ldy CH
@@ -30,16 +31,19 @@ putchar:
bmi wch
sta (BASL),Y
iny
wch:sty CH
wch:
sty CH
cpy WNDWDTH
bcc noend
ldy #$00
sty CH
newline:inc CV
newline:
inc CV
lda CV
cmp WNDBTM
bcc :+
lda WNDTOP
sta CV
: jmp VTABZ
noend: rts
noend:
rts

View File

@@ -18,11 +18,13 @@
jsr init
jsr zerobss
jsr callmain
_exit: ldx #<exit
_exit:
ldx #<exit
lda #>exit
jsr reset
jsr donelib
exit: ldx #$02
exit:
ldx #$02
: lda rvsave,x
sta SOFTEV,x
dex
@@ -40,7 +42,8 @@ exit: ldx #$02
.segment "ONCE"
init: ldx #zpspace-1
init:
ldx #zpspace-1
: lda sp,x
sta zpsave,x
dex
@@ -63,7 +66,8 @@ init: ldx #zpspace-1
.code
reset: stx SOFTEV
reset:
stx SOFTEV
sta SOFTEV+1
eor #$A5
sta PWREDUP

View File

@@ -9,7 +9,7 @@
.export __randomize
.import _srand
.include "apple2.inc"
.include "agat.inc"
__randomize:
ldx RNDH ; Use random value supplied by ROM