mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-11-30 15:49:55 +00:00
82d0e74c1a
some minor bugfixes, directory shuffling, added demo and utility disks
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
MEMFILL
|
|
PLA
|
|
STA RETADR
|
|
PLA
|
|
STA RETADR+1
|
|
PLA
|
|
STA :VALUE
|
|
PLA
|
|
STA :ARYSZ
|
|
PLA
|
|
STA :ARYSZ+1
|
|
PLA
|
|
STA ADDR1 ; ZERO PAGE POINTER
|
|
PLA ; DEFINED IN
|
|
STA ADDR1+1 ; DECS
|
|
LDA :VALUE ; GET VAL FOR FILL
|
|
LDX :ARYSZ+1 ; X=# OF PAGES TO DO
|
|
BEQ :PARTPG ; BRANCH IF HIGHBYTE OF SZ = 0
|
|
LDY #0
|
|
:FULLPG
|
|
STA (ADDR1),Y
|
|
INY ; INC TO NEXT BYTE
|
|
BNE :FULLPG ; BRANCH IF NOT DONE W/ PAGE
|
|
INC ADDR1+1 ; ADVANCE TO NEXT PAGE
|
|
DEX
|
|
BNE :FULLPG ; BRANCH IF NOT DONE W/ PAGES
|
|
:PARTPG
|
|
LDX :ARYSZ ;GET # OF BYTES IN FINAL PAGE
|
|
BEQ :EXIT ; BRANCH IF LOW BYTE = 0
|
|
LDY #0
|
|
:PARTLP
|
|
STA (ADDR1),Y ; STORE VAL
|
|
INY ; INCREMENT INDEX
|
|
DEX ; DECREMENT COUNTER
|
|
BNE :PARTLP ; BRANCH IF NOT DONE
|
|
:EXIT
|
|
LDA RETADR+1
|
|
PHA
|
|
LDA RETADR
|
|
PHA
|
|
RTS
|
|
:VALUE DS 1 ; FILL VALUE
|
|
:ARYSZ DS 2 ; ARRAY SIZE
|