home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1991 September
/
64er_Magazin_91-09_1991_Markt__Technik_de_Side_A.d64
/
protokoll.src
< prev
next >
Wrap
Text File
|
2022-10-26
|
7KB
|
333 lines
;=======================================
; basic-zeile mit sys-adresse
;=======================================
* = $0801 ;prog.start
.byte $0d,$08,$b2,$07
.byte $9e,$28,$32,$30
.byte $36,$35,$29,$00
.byte $00,$00,$ea,$ea
.byte $ea,$ea,$ea,$ea
;=======================================
; initialisierung
;=======================================
;---------------------------------------
; kopieren des basic aus dem rom ins ram
;---------------------------------------
von1 = $a000
bis1 = $c000
lda# <von1
sta $fa
lda# >von1
sta $fb
lda# <bis1
sta $fc
lda# >bis1
sta $fd
ldy# 0
kop2 lda ($fa),y
sta ($fa),y
inc $fa
bne kop3
inc $fb
kop3 ldx $fd
cpx $fb
bne kop2
ldx $fc
cpx $fa
bne kop2
;---------------------------------------
; kernal aus dem rom ins ram
;---------------------------------------
von2 = $e000
bis2 = $0000
lda# <von2
sta $fa
lda# >von2
sta $fb
lda# <bis2
sta $fc
lda# >bis2
sta $fd
ldy# 0
kopb lda ($fa),y
sta ($fa),y
inc $fa
bne kopc
inc $fb
kopc ldx $fd
cpx $fb
bne kopb
ldx $fc
cpx $fa
bne kopb
;---------------------------------------
; verlegen bis ziel-1 nach $e422
; kopieren
;---------------------------------------
cop1 lda# <verlegen
sta $fa
lda# >verlegen
sta $fb
lda# $22
sta $fc
lda# $e4
sta $fd
ldy# $00
cop2 lda ($fa),y
sta ($fc),y
inc $fc
bne cop3
inc $fd
cop3 inc $fa
bne cop4
inc $fb
cop4 ldx $fb
cpx# >ziel
bne cop2
ldx $fa
cpx# <ziel
bne cop2
;---------------------------------------
; ziel bis hilfe-1 nach $e460
; kopieren
;---------------------------------------
copa lda# <ziel
sta $fa
lda# >ziel
sta $fb
lda# $60
sta $fc
lda# $e4
sta $fd
ldy# $00
copb lda ($fa),y
sta ($fc),y
inc $fc
bne copc
inc $fd
copc inc $fa
bne copd
inc $fb
copd ldx $fb
cpx# >hilfe
bne copb
ldx $fa
cpx# <hilfe
bne copb
;---------------------------------------
; chrout bei $e716 auf erweiterung
; zeigen lassen (drucker-ausgabe)
;---------------------------------------
chr1 lda# $4c
ldx# $60 ; jmp $e460
ldy# $e4
sta $e716
stx $e717
sty $e718
;---------------------------------------
; irq bei $ea31 auf erweiterung zeigen
; lassen (tasten-abfrage)
;---------------------------------------
irq1
ldx# $25 ; jsr $e422+3
ldy# $e4
stx $ea32
sty $ea33
;---------------------------------------
; kontrollregister auf null setzen
;---------------------------------------
kon1 lda# 0
sta $e445 ;kontrolle
;---------------------------------------
; neues kernel einschalten
;---------------------------------------
neu lda# .53
sta $01
;---------------------------------------
; text ausgeben
;---------------------------------------
ldx# $00
ausgeben lda text,x
beq ausgeben1
jsr $ffd2 ;chrout
inx
bne ausgeben
ausgeben1 rts ;basic
;=======================================
; hauptroutinen, die ins kernal
; kopiert werden
;=======================================
;---------------------------------------
; jmp $a644 der ausgabe-routine der ein-
; schaltmeldung vorverlegen
;---------------------------------------
verlegen .byte $4c,$44,$a6
;---------------------------------------
; irq-abfrage
;---------------------------------------
sprung ldx $028d
cpx# $07 ;shift ctrl c=
bne sprung1
inc $d021 ;hintergrund
dec $d021 ;bestaetigung
cpx $e446 ;speicher
beq sprung1
lda $e445 ;kontrolle
eor# $ea
sta $e445 ;kontrolle
sprung1 stx $e446 ;speicher
jmp $ffea ;irq weiter
;---------------------------------------
kontrolle nop
;---------------------------------------
speicher nop
;---------------------------------------
; protokoll auf drucker
;---------------------------------------
ziel pha
lda $e445 ;kontrolle
beq ziel1
txa
pha
tya
pha
ldy# $01 ;gross/grafik
lda $d018
ror
ror
bcc gross
ldy# $07 ;gross/klein
gross lda# $04
ldx# $04 ;drucker
jsr $ffba ;setfls
lda# $00
jsr $ffbd ;setnam
jsr $ffc0 ;open
bcs fehler ;fehlermeldung
ldx# 4 ;drucker
jsr $ffc9 ;chkout
pla
tay
pla
tax
pla
jsr $ffd2 ;chrout
pha
txa
pha
tya
pha
lda# 4
jsr $ffc3 ;close
lda# $03 ;ausgabegeraet
sta $9a ;bildschirm
fehler pla
tay
pla
tax
ziel1 pla
pha
sta $d7
jmp $e719 ;chrout weiter
;---------------------------------------
hilfe nop ;kopierhilfe
;---------------------------------------
text .byte $0d
.byte 'initialisierung '
.byte 'beendet',$0d
.byte 'ein- und ausschalten: '
.byte 'shift + c= + ctrl',$0d
.byte 'nach einem reset mit '
.byte 'poke 1,53 wieder ',$0d
.byte 'aktivierbar!',$0d
.byte $0d,$00
.end