-
Notifications
You must be signed in to change notification settings - Fork 85
/
mon.twi
106 lines (106 loc) · 1.3 KB
/
mon.twi
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
.PAGE 'MON.TWI'
;
;
;
;
; *TRACE
;
; TRACE AND PRINT FILE LINKS
;
; $T TXX SXX DXX
;
;
TRACE JSR PARMS ; GET REQUIRED PARMS
LDA #0 ; DOIT IN JOB 0
STA JOBNUM
;
LDA #SEEK ; INIT THE JOB HEADER
JSR DOIT
JSR CRLF ; NEXT LINE PLEASE
;
TRAC10 LDA #RDJOB ; READ FIRST T,S
JSR DOIT
;
LDA #0 ; SET ADR1,ADR2,ADR3
STA ADR1
LDA #$11 ; ADR1 =$1100
STA ADR1+1
STA ADR2+1 ; ADR2= $1102
;
LDA #02
STA ADR2
;
LDA #<BUF+10
STA ADR3
LDA #>BUF ; ADR3 =BUF+10
STA ADR3+1
;
JSR MEMRD ; GO READ DISK INTO PET
;
LDA BUF+10 ; GET TRACK LINK
STA TRACK
JSR WROB ; WRITE OUT BYTE
LDA #'. ; WRITE TT.SS
JSR WROC
;
LDA BUF+11 ;GET SECTOR LINK
STA SECTOR
JSR WROB ; WRITE OUT SECTOR
JSR SPACE
JSR SPACE
JSR SPACE
;
LDA TRACK
BNE TRAC10
;
JMP STRT
;
;
;
;
;
;
;
; *WEDGE
;
; $>[COMMAND]
;
; SEND A DIRECT DISK COMMAND
;
WEDGE LDX #0 ; BUF POINTER
;
WEDG10 JSR BASIN ; GET COMMAND
CMP #CR
BEQ WEDG20 ;DONE
;
STA BUF,X ; SAVE AWAY
INX
BNE WEDG10
;
WEDG20 DEX ; DEC BUF LEN
;
JSR SNDCMD
JMP PRTERR
;
;
;
;
;
;
; *INIT
;
; $IXX
;
; INIT JOB HEADER WITH DISK ID
;
;
INIT JSR PARMS
;
LDA #SEEK ; DO A SEEK ON JOB
JSR DOIT
JMP PRTERR ; READ ERR CHANNEL
;
;
;
;
.END