This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pgfetch_ = $1b | |
; RegPtr -> C64 Memory Buffer to fetch | |
; C <- Set on failure to fetch | |
; C <- Clr on successful fetch | |
pgstash_ = $1e | |
; RegPtr -> C64 Memory Buffer to stash | |
; C <- Set on failure to stash | |
; C <- Clr on successful stash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unldcsum ;--- Unload checksum.lib --- | |
.block | |
lda chloaded | |
beq done ;Not loaded | |
ldx #"c" ;checksum.lib | |
ldy #"h" | |
lda #slunload ;Unload flag | |
jsr unldlib | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chloaded .byte 0 | |
ldchksum ;--- Load checksum.lib --- | |
.block | |
lda chloaded | |
bne done ;Already loaded | |
ldx #"c" ;checksum.lib | |
ldy #"h" | |
lda #3 ;3 pages, no flags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;--- Unload checksum.lib --- | |
ldx #"c" ;checksum.lib | |
ldy #"h" | |
lda #slunload ;Unload flag | |
jsr unldlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;--- Load checksum.lib --- | |
ldx #"c" ;checksum.lib | |
ldy #"h" | |
lda #3 ;3 pages, no flags | |
jsr loadlib | |
;A <- page address of library | |
;--- Link checksum.lib --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maketab .byte $4c,$06,$00 ;maketab_ = $06 | |
initcrc .byte $4c,$09,$00 ;initcrc_ = $09 | |
updc16 .byte $4c,$0f,$00 ;updc16_ = $0f | |
getcrc .byte $4c,$15,$00 ;getcrc_ = $15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#inc_h "checksum" | |
maketab jmp maketab_ | |
initcrc jmp initcrc_ | |
updc16 jmp updc16_ | |
getcrc jmp getcrc_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thisdirt #setflag this,dflags,df_dirty | |
rts | |
chkdirt lda tkenv+te_flags | |
and #tf_dirty | |
bne mkdirt+8 | |
sec ;not dirty | |
rts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 print"ascii to petscii converter" | |
20 print"copyright to whoever wrote it" | |
30 print | |
40 input"source file";sf$ | |
50 input"destination file";df$ | |
60 dv=peek(186) | |
70 open2,dv,2,sf$+",s,r" | |
80 open3,dv,3,df$+",s,w" | |
85 rem -------------------------------- | |
90 sys2000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.include "//os/h/:modules.h" | |
#inc_k "io" | |
#inc_s "file" | |
*=2000 | |
loop ldx #2 | |
jsr chkin | |
jsr chrin |
NewerOlder