home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_10_1986_Transactor_Publishing.d64
/
header.pal
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
2KB
|
95 lines
100 rem open1,8,1,"0:header.obj
110 [143] save"@0:header.pal",8
120 [158]700 ;pal 64 assembler
130 ;blocks [184]e.
140 ;this program lives inside the 1541
150 ; [175] creates an extra header block
160 ;it should be used with its basic
170 ; counterpart in the c64
180 ;
190 .opt o1
200 [172][178] $0800
210 jmp $eaa0 ;reset disk drive
220 lda $13fe ;track #;rentry from basic
230 sta $18
240 lda $13ff ;sec[164]r #
250 sta $19
260 lda #$00 ;checksum [129] header
270 e[176] $16
280 e[176] $17
290 e[176] $18
300 e[176] $19
310 sta $1a
320 jsr $f934 ;c[145]vert header [164] gcr
330 ldx #$00
340 loop1 lda $24,x ;s[164]re our header
350 sta $1000,x ;image in a safe place
360 inx
370 cpx #$0a
380 bne loop1
390 lda $13fe ;set up [129] [135]ing
400 sta $06 ;last sec[164]r [145] this track
410 ldx $13ff
420 dex
430 stx $07
440 lda #$00
450 sta $3d
460 sta $33
470 sta $30
480 lda #$06
490 sta $32
500 lda #$03
510 sta $31
520 jsr $f510 ;[135] in header block
530 jsr $f556 ;[146] [129] sync
540 [146]1 bvc [146]1 ;[135] in [131] block
550 clv
560 lda $1c01
570 sta ($30),y
580 iny
590 bne [146]1
600 ldy #$ba
610 [146]2 bvc [146]2
620 clv
630 lda $1c01
640 sta $0100,y
650 iny
660 bne [146]2
670 clv
680 hold bvc hold ;see [139] tail gap is
690 clv ;over
700 lda $1c01
710 cmp #$55
720 beq hold
730 lda $1c0c
740 [175] #$1f
750 [176]a #$c0
760 sta $1c0c
770 lda #$ff
780 sta $1c03
790 lda #$ff ;write out 5 sync markers
800 sta $1c01
810 ldx #$05
820 [146]3 bvc [146]3
830 clv
840 dex
850 bne [146]3
860 ldx #$00 ;write out extra header
870 [146]4 bvc [146]4 ;block that was
880 clv ;[148]d at $1000
890 lda $1000,x
900 sta $1c01
910 inx
920 cpx #$0a
930 bne [146]4
940 ldx #$09 ;write out header gap
950 [146]5 bvc [146]5
960 clv
970 lda #$55
980 sta $1c01
990 dex
1000 bne [146]5
1010 jsr $fe00 ;terminate write mode
1020 lda #$01 ;jump [164] err[176] h[175]ler
1030 jmp $f969 ;with a job all ok