-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathbamutl.src
59 lines (53 loc) · 1.55 KB
/
bamutl.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.messg "bamutl"
.subttl "bamutl"
.page
rdbam lda jobnum ; save it
sta tmpjbn
lda bam1 ; is it in memory?
bne bamend ; yes
lda #>bam1->buff0
ldx #1 ; sector
jsr setts
jsr doread
lda #>bam2->buff0
ldx #2 ; sec number
jsr setts
jsr doread
jmp bamend
bamout lda jobnum ; save it
sta tmpjbn
lda #>bam1->buff0
ldx #1 ; sector
jsr setts
jsr dowrit
lda #>bam2->buff0
ldx #2 ; sector
jsr setts
jsr dowrit
bamend lda tmpjbn
sta jobnum ; restore it
lda #0
sta wbam ; it clean now!
rts
rddir jsr mapout ; wrt bams if dirty
ldx #0 ; sector
lda jobnum
jsr setts ; set dir hdrs
jsr doread ; rd in the dir
jmp rdbam ; rd bams if not in memory
setts sta jobnum ;
stx sector ; set up t/s
ldx dirtrk ; trk #18
stx track
jmp seth ; setup hdrs
setbpt jsr rdbam ; rd bam if not in memory
setbp2 lda #>bam1 ; preset bam pointers
sta bmpnt+1
lda #0 ; default bam1 addr
sta bmpnt
rts
numfre lda ndbl
sta nbtemp
lda ndbh
sta nbtemp+1
rts