home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-10-18 | 57.2 KB | 1,492 lines |
- add-on-m*......page 0001
-
- line# loc code line
-
-
-
- 00001 0000 ;*****************************************
- 00002 0000 ;* *
- 00003 0000 ;* aaa dddd dddd 000 n n *
- 00004 0000 ;* a a d d d d o 0 nn n *
- 00005 0000 ;* a a d d d d *** o 0 n n n *
- 00006 0000 ;* aaaaa d d d d *** o o n n n *
- 00007 0000 ;* a a d d d d o o n nn *
- 00008 0000 ;* a a dddd dddd ooo n n *
- 00009 0000 ;* *
- 00010 0000 ;* m m ooo n n *
- 00011 0000 ;* mm mm o o nn n *
- 00012 0000 ;* *** m m m o o n n n *
- 00013 0000 ;* *** m m o o n n n *
- 00014 0000 ;* m m o o n nn *
- 00015 0000 ;* m m ooo n n *
- 00016 0000 ;* *
- 00017 0000 ;****************************************
-
-
- 00019 0000 ;*****************************************
- 00020 0000 ;* *
- 00021 0000 ;* 64k-add-on monitor *
- 00022 0000 ;* *
- 00023 0000 ;* this program allows a user to *
- 00024 0000 ;* examine, modify, and run programs *
- 00025 0000 ;* with breakpoints in the 64k add-on *
- 00026 0000 ;* memory. it is functionally the same *
- 00027 0000 ;* as the pet resident monitor. *
- 00028 0000 ;* *
- 00029 0000 ;* 29jan81 rjf 29jul81 rjf *
- 00030 0000 ;* *
- 00031 0000 ;* cbm part # 8032118 - 01 rev b *
- 00032 0000 ;* *
- 00033 0000 ;*****************************************
-
-
-
- add-on-m*......page 0002
-
- line# loc code line
-
- 00035 0000 ;
- 00036 0000 ;virtual registers
- 00037 0000 ;
- 00038 0000 pch *=*+1 ;program counter
- 00039 0001 pcl *=*+1
- 00040 0002 flgs *=*+1 ;processor status
- 00041 0003 acc *=*+1 ;accumulator
- 00042 0004 xr *=*+1 ;x index
- 00043 0005 yr *=*+1 ;y index
- 00044 0006 sp *=*+1 ;stack pointer
- 00045 0007 invh *=*+1 ;user irq vector
- 00046 0008 invl *=*+1
- 00047 0009 memmap *=*+1 ;add-on control reg
- 00048 000a ;
- 00049 000a ;indirect pointers
- 00050 000a ;
- 00051 000a stal *=*+1 ;save store pointer
- 00052 000b stah *=*+1
- 00053 000c ;
- 00054 000c sal *=*+1 ;load/save start
- 00055 000d sah *=*+1
- 00056 000e ;
- 00057 000e eal *=*+1 ;load/save end
- 0005b 000f eah *=*+1
- 00059 0010 ;
- 00060 0010 tmp0 *=*+2 ;monitor indirects
- 00061 0012 ;
- 00062 0012 tmp2 *=*+2
- 00063 0014 ;
- 00064 0014 ;working variables
- 00065 0014 ;
- 00066 0014 tmpc *=*+1
- 00067 0015 savx *=*+1
- 00068 0016 wrap *=*+1 ;wrap flag for displym
- 00069 0017 ;
- 00070 0017 tmpa *=*+1 ;.a save for irq
- 00071 0018 tmpps *=*+1 ;.p save for irq
-
-
-
- add-on-m*......page 0003
-
- line# loc code line
-
- 00073 0019 ;.
- 00074 0019 cinv =$90
- 00075 0019 cbinv =$92
- 00076 0019 buf =$200
- 00077 0019 fnadr =$da
- 00078 0019 fnlen =$d1
- 00079 0019 cr =$d
- 00080 0019 bad =$100
- 00091 0019 status =$96
- 00082 0019 fa =$d4
- 00093 0019 sa =$d3
- 00084 0019 rclrch =$f2a6
- 00095 0019 rlistn =$fod5
- 00086 0019 rsecho =$f143
- 00097 0019 rciout =$f19e
- 00088 0019 runlsn =$f1b9
- 00089 0019 rtalk =$f0d2
- 00090 0019 rtksa =$f193
- 00091 0019 racptr =$f1c0
- 00092 0019 runtlk =$f1ae
- 00093 0019 ropeni =$f4a5
- 00094 0019 stkey =$9b
- 00095 0019 ndx =$9e
-
-
-
- add-on-m*......page 0004
-
- line# loc code line
-
- 00097 0019 ;
- 00098 0019 * =1024
- 00099 0400 sys =158 ;basic token value
- 00100 0400 ;
- 00101 0400 ;enter compiled basic text
- 00102 0400 ;
- 00103 0400 00 .byt 0
- 00104 0401 00 04 .wor init-2
- 00105 0403 10 00 .wor $10
- 00106 0405 9e .byt sys
- 00107 0406 28 31 .byt '(1039)',0,0,0
- 00107 040c 00
- 00107 0400 00
- 00107 040e 00
- 00108 040f ;
- 00109 040f ;initialize interrupt process
- 00110 040f ;
- 00111 040f 79 init sei
- 00112 0410 a9 80 lda #%10000000
- 00113 0412 85 09 sta memmap
- 00114 0414 bd fo ff sta $fff0
- 00115 0417 20 2b 04 jsr setirq
- 00116 041a a9 98 lda #%10001000
- 00117 041c bd fo ff sta $fff0
- 00118 041f 20 2b 04 jsr setirq
- 00119 0422 a5 09 lda memmap
- 00120 0424 8d fo ff sta $fff0
- 00121 0427 ;
- 00122 0427 5b cli
- 00123 0428 4c 7a 04 jmp timc
-
-
-
- add-on-m*......page 0005
-
- line# loc code line
-
- 00125 042b a9 40 setirq lda #<irq
- 00126 0420 od fe ff sta $fffe
- 00127 0430 a9 04 lda #>irq
- 00129 0432 8d ff ff sta $ffff
- 00129 0435 a9 59 lda #<nmi
- 00130 0437 8d fa ff sta $fffa
- 00131 043a a9 04 lda #>nmi
- 00132 043c 8d fb ff sta $fffb
- 00133 043f 60 rts
-
-
- 00135 0440 ;process irq
- 00136 0440 ;
- 00137 0440 85 17 irq sta tmpa ;preserve a
- 00139 0442 ;
- 00139 0442 68 pla
- 00140 0443 48 pha
- 00141 0444 85 18 sta tmpps
- 00142 0446 ;
- 00143 0446 a9 00 lda #%00000000
- 00144 0448 8d f0 ff sta $fff0
- 00145 044b ;
- 00146 044b ;push return from interrupt address
- 00147 044b ;
- 00148 044b a9 04 lda #>rtip
- 00149 0440 48 pha
- 00150 044e a9 72 lda #<rtip
- 00151 0450 48 pha
- 00152 0451 ;
- 00153 0451 a5 16 lda tmpps
- 00154 0453 48 pha ;push dummy status
- 00155 0454 ;
- 00156 0454 a5 17 lda tmpa ;restore a
- 00157 0456 ;
- 00158 0456 ;go to rom irq service
- 00159 0456 ;
- 00160 0456 6c fe ff jmp ($fffe)
-
-
- 00162 0459 ;process nmi
- 00163 0459 ;
- 00164 0459 ;process nmi
- 00165 0459 ;
- 00166 0459 85 17 nmi sta tmpa ;preserve a
- 00167 045b ;
- 00168 045b 68 pla
- 00169 045c 48 pha
- 00170 045d 85 18 sta tmpps
- 00171 045f ;
-
-
-
- add-on-m*......page 0006
-
- line* loc code line
-
- 00172 045f ;
- 00173 045f a9 00 lda #%00000000
- 00174 0461 8d f0 ff sta $fff0
- 00175 0464 ;
- 00176 0464 ;push return from interrupt address
- 00177 0464 ;
- 00178 0464 a9 04 lda #>rtip
- 00179 0466 49 pha
- 00180 0467 a9 72 lda #<rtip
- 00181 0469 48 pha
- 00192 046a ;
- 00183 046a a5 19 lda tmpps
- 00184 046c 48 pha ;push dummy status
- 00185 0460 ;
- 00186 0460 a5 17 lda tmpa
- 00187 046f ;
- 00188 046f ;g0 to rom irq service
- 00189 046f ;
- 00190 046f 6c fa ff jmp ($fffa)
-
-
- 00192 0472 ;return from interrupt process
- 00193 0472 ;
- 00194 0472 49 rtip pha
- 00195 0473 ;
- 00196 0473 ;map back to original ram
- 00197 0473 ;
- 0019b 0473 a5 09 lda memmap
- 00199 0475 8d f0 ff sta $fff0
- 00200 0479 ;
- 00201 0478 ;restore old .a
- 00202 0478 ;
- 00203 0478 68 pla
- 00204 0479 ;
- 00205 0479 ;back to user
- 00206 0479 ;
- 00207 0479 40 rti
-
-
-
- monitor......page 0007
-
- line# loc code line
-
- 00209 047a ;************************************************
- 00210 047a ;* *
- 00211 047a ;* kernal monitor *
- 00212 047a ;* *
- 00213 047a ;* entry via call (jmp) or breakpoint (brk) *
- 00214 047a ;* --- functions--- *
- 00215 047a ;* <:> alter memory *
- 00216 047a ;* <;> alter registers *
- 00217 047a ;* <r> display registers *
- 00218 047a ;* <m> display memory *
- 00219 047a ;* <g> start execution of code *
- 00220 047a ;* <l> load memory *
- 00221 047a ;* <s> save memory *
- 00222 047a ;* <@> disk command *
- 00223 047a ;* <*> add-on control register *
- 00224 047a ;* <other> load and execute from disk *
- 00225 047a ;* *
- 00226 047a ;* for syntax & semantics see cbm kernal manual *
- 00227 047a ;* copyright (c) 1980 by cbm *
- 0022E 047a ;************************************************
-
-
-
- monitor......page 0008
-
- line# loc code line
-
- 00230 047a ;*****call entry*****
- 00231 047a ;
- 00232 047a timc
- 00233 047a a9 88 lda #<timb
- 00234 047c 85 92 sta cbinv
- 00235 047e a9 04 lda #>timb
- 00236 0480 85 93 sta cbinv+1
- 00237 0492 a9 5e lda #ms34-ms1 ;call entry
- 00238 0484 95 14 sta tmpc
- 00239 0486 d0 10 bne b3 ;branch always
- 00240 0489 ;
- 00241 0489 ;*****break entry*****
- 00242 0489 ;
- 00243 0488 20 91 09 timb jsr clrch ;clr channels
- 00244 046b a9 75 lda #ms36-ms1 ;break entry
- 00245 048d 85 14 sta tmpc
- 00246 048f d8 cld
- 00247 0490 ;
- 00248 0490 ;save .y,.x,.a,flags, and pc
- 00249 0490 ;
- 00250 0490 a2 05 ldx #5
- 00251 0492 68 b1 pla
- 00252 0493 95 00 sta pch,x
- 00253 0495 ca dex
- 00254 0496 10 fa bpl b1
- 00255 0498 ;
- 00256 0498 a5 90 b3 lda cinv
- 00257 049a 85 08 sta invl ;save irq low
- 00250 049c a5 91 lda cinv+1
- 00259 049e 95 07 sta invh ;save irq high
- 00260 04a0 ;
- 00261 04a0 ba tsx
- 00262 04a1 86 06 stx sp ;save original sp
- 00263 04a3 58 cli ;clear ints
- 00264 04a4 ;
- 00265 04a4 a4 14 b5 ldy tmpc ;message code
- 00266 04a6 20 62 09 jsr msg ;print break/call
- 00267 04a9 ;
- 0026E 04a9 a9 52 lda #'r ;display regs on entry
- 00269 04ab do 17 bne so ;branch always
- 0027c 04ad ;
- 00271 04ad ;*****error entry*****
- 00272 04ad ;
- 00273 04ad 20 50 05 erropr jsr outqst
- 00274 04b0 68 pla
- 00275 04b1 60 pla
- 00276 04b2 ;
- 00277 04b2 ;*****command interpreter entry*****
- 0027b 04b2 ;
- 00279 04b2 strtm1=*-1
- 00280 04b2 a2 00 ldx #<buf ;place to put file name
- 00281 04b4 ao 02 ldy #>buf
- 00292 04b6 86 da stx fnadr
- 00203 04b8 94 db sty fnadr+1
- 002e4 04ba 20 53 05 jsr crlf
-
-
-
- monitor......page 0009
-
- line# loc code line
-
- 00285 04bd ;
- 00286 04od 20 71 09 st1 jsr basin ;read command
- 00287 04c0 c9 20 cmp #$20
- 00289 04c2 fo f9 beg st1 ;span blanks
- 002b9 04c4 ;
- 00290 04c4 ;command interpreter
- 00291 04c4 ;
- 00292 04c4 a2 00 so ldx #0
- 00293 04c6 96 16 stx wrap
- 00294 04c8 86 d1 stx fnlen
- 00295 04ca a8 tay :save current command
- 00296 04c8 ;
- 00297 04cb ;put return address for comands on stack
- 00299 04cb ;
- 00299 04cb a9 04 lda #>strtm1
- 00300 04cd 48 pha
- 00301 04ce a9 b1 lda #<strtm1
- 00302 04d0 48 pha
- 00303 04d1 ;
- 00304 04d1 98 tya ;current command in .a
- 00305 04d2 ;
- 00306 04d2 dd 16 05 s1 cmp cmds,x ;is it this one?
- 00307 04d3 do of bne s2 ;notit
- 00309 04d7 ;
- 00309 04d7 85 15 sta savx ;save current command
- 00310 04d9 ;
- 00311 04d9 ;indirekt jmp from table
- 00312 04d9 ;
- 00313 04d9 bd 17 05 lda cmds+1,x
- 00314 04dc 85 10 sta tmp0
- 00315 04de bd 18 05 lda cmds+2,x
- 00316 04e1 85 11 sta tmp0+1
- 00317 04e3 6c 10 00 jmp (tmp0)
- 00318 04e6 ;
- 00319 04e6 ;each table entry is 3 long---skip to next
- 00320 04e6 ;
- 00321 04e6 e8 s2 inx
- 00322 04e7 e8 inx
- 00323 04e9 e8 inx
- 00324 04e9 eo 1b cpx #cmdend-cmds
- 00325 04eb 90 e5 bcc s1 ;loop f0r all commands
- 00326 04ed ;
- 00327 04ed ;command not in table.,.look on disk.
- 0g328 04ed ;command name can be any length and
- 00329 04ed ;have parameters.
- 00330 04ed ;
- 00331 04ed a2 00 ldy #0 ;length to zero
- 00332 04ef c9 00 s3 cmp #$d ;end of name?
- 00333 04f1 fo 00 beq s4 ;yes...
- 00334 04f3 c9 20 cmp #$20 ;blank?
- 00335 04f5 fo 09 beq s4 ;yes
- 00336 04f7 9d 00 02 sta buf,x
- 00337 04fa 20 71 09 jsr basin ;get next
- 00338 04fd e8 inx ;count char
- 00339 04fe do ef bne s3 ;and continue
-
-
-
- monitor......page 0010
-
- line# loc code line
-
- 30340 0500 ;
- 00341 0500 85 14 s4 sta tmpc
- 30342 0502 8a txa ;count
- 00343 0503 f0 10 beq s6 ;is zero
- 00344 0505 ;
- 00345 0505 85 01 sta fnlen
- 00346 0507 a9 08 lda #8
- 00347 0509 85 04 sta fa ;will use device #8
- 00348 050b 20 96 07 jsr load ;try to load command
- 00349 050e bo 05 bcs s6 ;bad load...
- 00350 0510 ;
- 00351 0510 a5 14 lda tmpc ;pass last character
- 00352 0512 6c oa 00 jmp (stal) ;go do it
- 00353 0515 ;
- 00354 0515 60 s6 rts
-
- 00356 0516 3a cmds .byt ':' ;alter memI3ry
- 00357 0517 of 06 .wor altm
- 00359 0519 3b .byt ';' ;alter registers
- 00359 051a f5 05 .wor altr
- 00360 051c 52 .byt 'r' ;display registeps
- 00361 0510 73 05 .wor dsplyr
- 00362 051f 40 .byt 'm' ;display memory
- 00363 0520 84 05 .wor dsplym
- 00364 0522 47 .byt 'g' ;start execution
- 00365 0523 32 06 .wor go
- 00366 0525 4c .byt 'l' ;load memory
- 00367 0526 5e 06 .wor ld
- 00368 0529 53 .byt 's' ;save memory
- 00369 0529 5e 06 .wor ld
- 00370 052b 2a .byt '*' ;map memory
- 00371 052c 2c 06 .wor mapper
- 00372 052e 40 .byt '@' ;disk command (alternate)
- 00373 052f 49 07 .wor disk
- 00374 0531 cmdend
-
- 00376 0531 a5 10 putp lda tmp0 ;move tmp0 to pch,pcl
- 00377 0533 85 01 sta pcl
- 00378 0535 a5 11 lda tmp0+l
- 00379 0537 95 00 sta pch
- 00380 0539 60 rts
-
- 00382 053a a9 02 setr lda #<flgs ;set to access regs
- 00393 053c 85 10 sta tmp0
- 00384 053e a9 00 lda #>flgs
-
-
-
- monitor......page 0011
-
- line# loc code line
-
- 00395 0540 95 11 sta tmp0+l
- 00386 0542 a9 05 lda #5
- 00397 0544 60 rts
-
- 00389 0545 ;prints ':' or ';' before data to permit
- 00390 0545 ;alter after 'm' or 'r' command
- 00391 0545 ;
- 00392 0545 48 altrit pha ;preserve alter character
- 00393 0546 20 53 05 jsr crlf
- 00394 0549 6E pla
- 00395 054a 20 81 09 jsr bsout
-
- 00397 0540 a9 20 space lda #$20 ;output a spacf
- 00398 054f 2c .byt $2c ;skip two bytes
- 00399 0550 a9 3f outqst lda #'?' ;output question
- 00400 0552 2c .byt $2c ;skip two bytes
- 00401 0553 a9 od crlf lda #$d ;do carriage return
- 00402 0555 4c 91 09 jmp bsout
-
- 00404 0559 ;data for register display heading
- 00405 055b ;
- 00406 0558 00 regk .byt cr,$20,$20 ;3 spaces
- 00406 0559 20
- 00406 055a 20
- 00407 0552 20 50 .byt ' pc ',' irq ',' sr ac xr yr sp'
- 00407 055f 20 49
- 00407 0564 20 53
-
- 00409 0573 ;display register function
- 00410 0573 ;
- 00411 0573 a2 00 dsplyr ldx #0
- 00412 0575 bd 58 05 d2 lda regk,x
- 00413 0578 20 81 09 jsr bsout ;print heading
- 00414 057b e8 inx
- 00415 057c e0 1b cpx #dsplyr-regk ;max lenoth
- 00416 057e do f5 bne d2
- 00417 0580 a9 39 lda #';'
- 00418 0582 20 45 05 jsr altrit ;allow alter after display
- 00419 0585 a6 00 ldx pch
- 00420 0587 a4 01 ldy pcl
- 00421 0589 20 dc 06 jsr wroa ;print program cmmter
-
-
-
- monitor......page 0012
-
- line# loc code line
-
- 00422 058c 20 4d 05 jsr space
- 00423 058f a6 07 ldx invh
- 00424 0591 a4 08 ldy invl
- 00425 0593 20 dc 06 jsr wroa ;print irq vector
- 00426 0596 20 3a 05 jsr setr ;set to print .p,.a,.x,.y,.s
- 00427 0599 ;
- 00429 0599 ;display memory subroutine
- 00429 0599 ;
- 00430 0599 85 14 dm sta tmpc ;byte count
- 00431 059b ao 00 ldy #0 ;indirect index
- 00432 059d 20 40 05 dm1 jsr space ;space tween bytes
- 00433 05a0 81 10 lda (tmp0),y
- 00434 05a2 20 e1 06 jsr wrob ;write byte of memory
- 00435 05a5 ;
- 00436 05a5 ;increment indirect
- 00437 05a5 ;
- 00438 05a5 e6 10 inc tmp0
- 00439 05a7 do 06 bne dm2
- 00440 05a9 e6 11 inc tmp0+1
- 00441 05ab do 02 bne dm2
- 00442 05ad e6 16 inc wrap
- 00443 05af ;
- 00444 05af c6 14 dm2 dec tmpc ;count bytes
- 00445 0581 do fa bne dm1 ;until zero
- 00446 0583 60 rts
-
- 00448 05b4 ;display memory function
- 00449 05b4 ;
- 00450 05b4 20 09 07 dsplym jsr rdoa ;read start adr
- 00451 05b7 do 39 bcs errs1 ;err if no sa
- 00452 05b9 20 f9 06 jsr t2t2 ;sa to tmp2
- 00453 059c ;
- 00454 05bc ;allow user to type just one address
- 00455 05bc ;
- 00456 05bc 20 09 07 jsr rdoa ;read end adr
- 00457 05bf 90 06 bcc dsp1o ;g00d.. no default
- 00458 05c1 ;
- 00459 05c1 a5 12 lda tmp2
- 00460 05c3 05 10 sta tmp0 ;default low byte
- 00461 05c5 a5 13 lda tmp2+1
- 00462 05c7 85 11 sta tmp0+1 ;default hi byte
- 00463 05c9 ;
- 00464 05c9 20 f9 06 dsp10 jsr t2t2 ;sa to tmp0, ea to tmp2
- 00465 05cc 20 aa 08 dsp1 jsr stop ;stop key?
- 00466 05cf fo 20 beq beqs1 ;yes...break list
- 00467 05d1 ;
- 00468 05d1 a9 3a lda ':'
- 00469 05d3 20 45 05 jsr altrit ;allow alter
- 00470 05d6 a6 11 ldx tmp0+1
- 00471 05d8 a4 10 ldy tmp0
- 00472 05da 20 dc 06 jsr wroa ;write start address
-
-
-
- monitor......page 0013
-
- line# loc code line
-
- 00473 05dd a9 09 lda #8 ;count of bytes
- 00474 05df 20 99 05 jsr dm ;display bytes
- 00475 05e2 a5 16 lda wrap
- 00476 05e4 do ob bne beqs1
- 00477 05e6 ;
- 00478 05e6 ;check for end of display
- 00479 05e6 ;
- 00400 05e6 38 sec
- 00481 05e7 a5 12 lda tmp2
- 004b2 05e9 e5 10 sbc tmp0
- 00483 05eb a5 13 lda tmp2+1
- 00484 05ed e5 11 sbc tmp0+l
- 00485 05ef bo db bcs dsp1 ;end >= start
- 00486 05f1 ;
- 00487 05f1 60 beqs1 rts ;a.o.k. exit
- 00488 05f2 ;
- 00499 05f2 4c ad 04 errs1 jmp erropr ;syntax error
-
- 00491 05f5 ;alter register function
- 00492 05f5 ;
- 00493 05f5 20 09 07 altr jsr rdoa ;read new pc
- 00494 05f8 bo fs bcs errs1 ;error... no adoress
- 00495 05fa ;
- 00496 05fa 20 31 05 jsr putp ;alter pc
- 00497 05fd ;
- 00498 05fd 20 09 07 jsr rdoa ;read new irq
- 00499 0600 bo fo bcs errs1 ;error...no address
- 00500 0602 ;
- 00501 0602 a5 10 lda tmp0
- 00502 0604 85 08 sta invl ;alter irq vector
- 00503 0606 a5 11 lda tmp0+1
- 00504 0608 85 07 sta invh
- 00505 060a ;
- 00506 060a 20 3a 05 jsr setr ;set to alter r's
- 00507 060d d0 07 bne a4 ;branch always
-
- 00509 060f ;alter memory - read adr and data
- 00510 060f ;
- 00511 060f 20 09 07 altm jsr rdoa ;read alter adr
- 00512 0612 bo de bcs errs1 ;if space,err
- 00513 0614 ;
- 00514 0614 a9 08 lda #8 ;allow eight bytes change
- 00515 0616 ;
- 00516 0616 ;common code for ':' and ';'
- 00517 0616 ;
- 00519 0616 85 14 a4 sta tmpc ;number of bytes to change
- 00519 0618 ;
-
-
-
- monitor......page 0014
-
- line# loc code line
-
- 00520 0618 20 16 07 a5 jsr rdob ;read byte
- 00521 061b bo oe bcs a9 ;none...end of line
- 00522 061d ;
- 00523 061d a2 00 ldx #0
- 00524 061f 81 10 sta (tmp0,x) ;store it away
- 00525 0621 ;
- 00526 0621 ;increment store address
- 00527 0621 ;
- 00528 0621 e6 10 inc tmp0
- 00529 0623 do 02 bne a6
- 00530 0625 e6 11 inc tmp0+1
- 00531 0627 ;
- @0532 0627 c6 14 a6 dec tmpc ;count byte
- 00533 0629 do ed bne a5 ;until zero
- 00534 062b ;
- 00535 062b 60 a9 rts
-
- 00537 062c ;map memory
- 00538 062c ;
- 00539 062c 20 16 07 mapper jsr rdob
- 00540 062f 95 09 sta memmap
- 00541 0631 60 rts
-
- 00543 0632 ;start execution function
- 00544 0632 ;
- 00545 0632 20 45 07 go jsr rdoc ;see if default
- 00546 0635 fo 08 beq g1 ;yes... pc is address
- 00547 0637 ;
- 00548 0637 20 09 07 jsr rdoa ;n0.. get new addr
- 00549 o63a bo 1f bcs errl ;error.. address screwed up
- 00550 063c ;
- 00551 063c 20 31 05 jsr putp ;move addr to p.c.
- 00552 063f ;
- 00553 063f a6 06 g1 ldx sp
- 00554 0641 9a txs ;orig or new sp value to sp
- 00555 0642 ;
- 00556 0642 78 sei ;prevent disaster
- 00557 0643 ;
- 00559 0643 a5 07 lda invh
- 00559 0645 85 91 sta cinv+1 ;set up irq vector
- 00560 0647 a5 08 lda invl
- 00561 0649 85 90 sta cinv
- 00562 064b ;
- 00563 064b ;get flags,pch,pcl,.a,.x,.y
- 00564 064b ;
- 00565 0648 a2 00 ldx #0
- 00566 064d b5 00 g2 lda pch,x
-
-
-
- monitor......page 0015
-
- line# loc code line
-
- 00567 064f 48 pha ;everybody on siack
- 00568 0650 e8 inx
- 00569 0651 e0 06 cpx #6
- 00570 0653 d0 fs bne g2
- 00571 0655 ;
- 00572 0655 ;interrupt return sets everybody up
- 00573 0655 ;from data on stack
- 00574 0655 ;
- 00575 0655 68 prend pla
- 00576 0656 a8 tay
- 00577 0657 68 pla
- 00579 0658 aa tax
- 00579 0659 69 pla
- 00590 065a 40 rti
-
-
- 00582 065b 4c ad 04 errl jmp erropr ;syntax error jump
-
-
- 00594 065e ;load ram function
- 00595 065e ;
- 00586 065e a0 01 ld ldy #1
- 00587 0660 94 04 sty fa ;default device #L
- 00588 0662 88 dey ;.y=0 to count name length
- 00589 0663 ;
- 00590 0663 20 45 07 l1 jsr rdoc ;default?
- 00591 0666 f0 1c beq l5 ;yes...try load
- 00592 0668 ;
- 00593 0668 c9 20 cmp #'
- 00594 066a fo f7 beg l1 ;span blanks
- 00595 066c ;
- 00596 066c c9 22 cmp #'" ;string next?
- 00597 066e d0 eb l2 bne errl ;n0 file name
- 00598 0670 ;
- 00599 0670 20 45 07 l3 jsr rdoc ;get character of name
- 00600 0673 fo of beq l5 ;end...asssume load
- 00601 0675 ;
- 00603 0675 c9 22 cmp #'" ;end of string?
- 00603 0677 f0 14 beq l8 ;yes...could still be 'l' or
- 00604 0679 ;
- 00605 0679 91 da sta (fnadr)y ;store name
- 00606 067b e6 01 inc fnlen
- 00607 0670 c8 iny
- 00608 067e co 10 cpy #16 ;max filf name length
- 00609 0680 ;
- 00610 0680 fc 09 l4 beq errl ;file name tod long
- 00611 0682 do ec bne l3 ;branch always
- 00612 0684 ;
- 00613 0684 ;see if we got a load
- 00614 0B84 ;
- 00615 0684 a5 15 l5 lda savx ;get last command
- 00616 0696 c9 4c cmp #'l
- 00617 0688 do e4 bne l2 ;no..not a load..error
-
-
- monitor......page 0016
-
- line# loc code line
-
- 00618 068a ;
- 00619 068a 4c 96 07 jmp load ;yes...do load
- 00620 068d ;
- 00621 068d l8 jsr rdoc ;more stuff?
- 00622 0690 fo f2 beq l5 ;no... defualt load
- 00623 0692 ;
- 00624 0692 c9 2c cmp #', ;deleimeter?
- 00625 0694 do d8 l9 bne l2 ;nd...bad syntax
- 00626 0696 ;
- 00627 0696 20 16 07 jsr rdob ;yes...get next parm
- 00628 0699 do 3e bcs l15 ;not good
- 00629 0690 ;
- 00630 069b 85 04 sta fa
- 00631 0690 ;
- 00632 0690 20 45 07 jsr rdoc ;more parms?
- 00633 06a0 fo e2 beq l5 ;no... default load
- 00634 06a2 ;
- 00635 06a2 c9 2c cmp #', ;delimeter?
- 00636 06a4 d0 ee l12 bne l9 ;no...bad syntax
- 00637 06a6 ;
- 00638 06a6 20 09 07 jsr rdoa ;start address?
- 00639 06a9 b0 2e bcs l15 ;no...bad
- 00640 06ab ;
- 00641 06a8 20 f9 06 jsr t2t2 ;preserve start
- 00642 06ae 20 71 09 jsr basin ;delimeter?
- 00643 06b1 c9 2c cmp #',
- 00644 06b3 d0 ef l13 bne l12 ;no...
- 00645 06b5 20 09 07 jsr rdoa ;try to read end
- 00646 06bE do 1f bcs l15 ;none...error
- 00647 06ba ;
- 00648 06ba ;set up end save address
- 00649 06ba ;
- 00650 068a a5 10 lda tmp0
- 00651 06bc 85 0e sta eal
- 00652 06be a5 11 lda tmp0+l
- 00653 06c0 85 of sta eah
- 00654 06c2 20 f9 06 jsr t2t2
- 00655 06c5 ;
- 00656 06c5 20 71 09 l20 jsr basin
- 00657 06c8 C9 20 cmp #$20 ;span blanks
- 00658 06ca fo f9 beq l20
- 00659 06cc ;
- 00660 06cc c9 od cmp #cr
- 00661 06ce do e3 l14 bne l13 ;missing cr at end
- 00662 06d0 a5 15 lda savx ;was command save?
- 00663 06d2 c9 53 cmp #'s
- 00664 06d4 do fe bne l14 ;no...load can't have parms
- 00665 06d6 4c 20 08 jmp save
- 00666 06d9 ;
- 00667 06d9 4c ad 04 l15 jmp erropr
-
-
- monitor......page 0017
-
- line loc code line
-
- 00669 06dc ;write adr from tmp0 stores
- 00670 06dc ;
- 00671 06dc 8a wroa txa ;hi-byte
- 00672 06dd 20 e1 06 jsr wrob
- 00673 06e0 98 tya ;low--byte
-
- 00675 06e1 ;write byte --- a = byte
- 00676 06e1 ;unpack byte data into two ascii
- 00677 06e1 ;characters. a=byte; x,a=chars
- 00678 06e1 49 wrob pha
- 00679 06e2 4a lsr a
- 00690 06e3 4a lsr a
- 006EL 06e4 4a lsr a
- 00692 06e5 4a lsr a
- 00683 06e6 20 ed 06 jsr ascii ;convert to ascii
- 00684 06e9 aa tax
- 00685 06ea 69 pla
- 00696 06eb 29 of and #$of
-
- 00688 06ed ;cdnvert nybble in a to ascii and
- 00699 06ed ;print it
- 00690 06ed ;
- 00691 06ed 18 ascii clc
- 00692 06ee 69 f6 adc #$f6
- 00693 06f0 90 02 bcc asc1
- 00694 06f2 69 06 adc #$06
- 00695 06f4 69 3a asc1 adc #$3a
- 00696 06f6 4c 81 09 jmp bbout
-
-
- 00698 06f9 ;exchange tempoparies
- 00699 06f9 ;
- 00700 06f9 a2 02 t2t2 ldx #2
- 00701 06fb b5 of t2t21 lda tmp0-1,x
- 00702 06fd 49 pha
- 00703 06fe b5 11 lda tmp2-1,x
- 00704 0700 95 of sta tmp0-1,x
- 00705 0702 68 pla
- 00706 0703 95 11 sta tmp2-1,x
- 00707 0705 ca dex
- 00709 0706 d0 f3 bne t2t21
- 00709 0709 60 rts
-
- 00711 0709 ;read hex adr,return hi in tmp0,
-
-
- monitor......page 0018
-
- line# loc code line
-
- 00712 0709 ;lo in tmp0+1,and cy=1
- 00713 0709 ;if sp cy=0
- 00714 0709 ;
- 00715 0709 20 16 07 rdoa jsr rdob ;read 2-char byte
- 00716 070c bo 07 bcs rdoa2 ;space
- 00717 070e 85 11 sta tmp0+1
- 00719 0710 20 16 07 jsr rdob
- 00719 0713 85 10 sta tmp0
- 00720 0715 60 rdoa2 rts
- 00721 0716 ;read hex byte and return in a
- 00722 0716 ;and cy=0 if sp cy=1
- 00723 0716 a9 00 rdob lda #0 ;space
- 00724 0718 bd 00 01 sta bad ;read next char
- 00725 0719 20 45 07 jsr rdoc
- 00726 07Le fo 19 beq rdob4 ;fail on cr
- 00727 0720 c9 20 cmp #' ;blank?
- 00729 0722 fo f2 beq rdob ;span blanks...
- 00729 0724 ;
- 00730 0724 20 3a 07 jsr hexit ;convert to hex nybble
- 00731 0727 oa asl a
- 00732 0729 oa asl a
- 00733 0729 oa asl a
- 00734 072a oa asl a
- 00735 072b 8d 00 01 sta bad
- 00736 072e 20 45 07 jsr rdoc ;2nd char assumed hex
- 00737 0731 fo 06 beq rdob4 ;fail on cr
- 00738 0733 20 3a 07 jsr hexit
- 00739 0736 od 00 01 ora bad
- 00740 0739 ;
- 00741 0739 60 rdob4 rts
-
- 00743 073a ;convert ascii char to hex nybble
- 00744 073a ;
- 00745 073a c9 3a hexit cmp #$3a
- 00746 073c 08 php ;save flags
- 00747 0730 29 of and #$of
- 00749 073f 2A plp
- 00749 0740 90 02 bcc hex09 ;0-9
- 00750 0742 69 08 adc #8 ;alpha add 8+cy=9
- 00751 0744 60 hex09 rts
-
- 00753 0745 ;get character and test for cr
- 00754 0745 ;
- 00755 0745 20 71 09 rdoc jsr basin
- 00756 0748 c9 od cmp #$od ;is it a cr
- 00757 074a 60 rts ;return with flags
-
-
- monitor......page 0019
-
- line# loc code line
-
- 00759 074b ;send disk command or read status
- 00760 0740 ;
- 00761 0748 a9 00 disk lda #0 ;clear status @ i/0 begin
- 00762 0740 85 96 sta status
- 00763 074f ;
- 00764 074f 20 45 07 jsr rdoc ;see if status check
- 00765 0752 fo 22 beq disk20 ;yes
- 00766 0754 ;
- 00767 0754 48 pha
- 00768 0755 a9 08 lda #8 ;floppy is device #8
- 00769 0757 20 9f 09 jsr listn ;tell floppy to receive
- 00770 075a a9 6f lda #15+$60
- 00771 075c 20 af 09 jsr secnd ;on command channel
- 00772 075f ;
- 00773 073f 68 pla
- 00774 0760 a6 96 ldx status ;error?
- 00775 0762 10 06 bpl disk15 ;no... ok
- 00776 0764 ;
- 00777 0764 4c c6 08 disk5 jmp error5 ;device not present
- 00778 0767 ;
- 00779 0767 20 71 09 disk10 jsr basin ;get a character
- 00780 076a c9 od disk15 cmp #$d ;see if end
- 00791 076c 08 php ;save for later
- 00792 0760 20 bf 09 jsr ciout ;out to floppy
- 00783 0770 28 plp ;end?
- 00784 0771 d0 f4 bne disk10 ;no,..continue
- 00785 0773 ;
- 00786 0773 4c cf 09 jmp unlsn ;yes... floppy done
- 00797 0776 ;
- 00788 0776 20 53 05 disk20 jsr crlf
- 00799 0779 a9 06 lda #8 ;floppy is device #8
- 00790 077b 20 dd 09 jsr talk ;tell floppy to speak
- 00791 077e a9 6f lda #15+$60
- 00792 0780 20 ed 09 jsr tksa ;from error channel
- 00793 0783 ;
- 00794 0783 a5 96 lda status ;an error?
- 00795 0785 30 dd bmi disk5 ;yes...
- 00796 0787 ;
- 00797 0787 20 fd 09 disk25 jsr acptr ;get a character
- 00798 076a c9 od cmp #$d ;see if end
- 00799 07ec 09 php ;test later
- 00800 0780 20 81 09 jsr bsout ;out to screen
- 00801 0790 28 plp ;end?
- 00802 0791 00 f4 bne disk25 ;n0 ..
- 00803 0793 4c od oa jmp untlk ;yes,. flopbpy done
-
-
- load function......page 0020
-
- line# loc code line
-
- 00805 0796 ;**********************************
- 00806 0796 ;* load ram function *
- 00807 0796 ;* *
- 00808 0796 ;* loads from cassette 1 or 2, or *
- 00809 0796 ;* ieee bus devices >=4 to 31 as *
- 00810 0796 ;* determined by contents of *
- 00811 0796 ;* variable fa. verify flag in .a *
- 00812 0796 ;* high load return in x,y. *
- 00813 0796 ;* .a=0 performs load,<> is verify*
- 00814 0796 ;* *
- 00815 0796 ;**********************************
-
- 00817 0796 load
- 00818 0796 a9 00 lda #0
- 00819 0799 95 96 sta status
- 00820 079a ;
- 00821 079a a5 d4 lda fa ;check device number
- 00822 079c c9 04 cmp #4
- 00823 079e bo 03 bcs ld20
- 00824 07a0 ;
- 00825 07a0 4c 02 08 ld10 jmp error9 ;bad device #
- 00826 07a3 ;
- 00827 07a3 ld20
- 00828 07a3 ;
- 00829 07a3 ;load from cbm ieee device
- 00830 07a3 ;
- 00831 07a3 a9 60 lda #$60 ;special load command
- 00832 07a5 85 d3 sta sa
- 00833 07a7 ;
- 00834 07a7 a4 d1 ldy fnlen ;must have i@ile name
- 00835 07a9 do 03 bne ld25 ;yes...ok
- 00836 07ab ;
- 00837 07ab 4c cf 09 jmp error8 ;missing file name
- 00838 07ae ;
- 00839 07ae 20 od 08 ld25 jsr luking ;tell user looking
- 00840 07b1 20 1b oa jsr openi ;open the file
- 00841 07b4 ;
- 00842 07b4 a5 04 lda fa
- 00843 07b6 20 dd 09 jsr talk ;establish the channel
- 00844 07b9 a5 03 lda sa
- 00845 07bb 20 ed 09 jsr tksa ;tell it to load
- 00846 07be ;
- 00847 07be 20 fd 09 jsr acptr ;get first byte
- 00849 07c1 85 oe sta eal
- 00849 07c3 85 oa sta stal
- 00850 07c5 ;
- 00851 07c5 a5 96 lda status ;test status for error
- 00852 07c7 4a lsr a
- 00853 07c9 4a lsr a
- 00854 07c9 bo 39 bcs ld90 ;file not f0und...
- 00855 07c3 20 fd 09 jsr acptr
- 00856 07ce 85 of sta eah
- 00057 07d0 85 ob sta stah
-
-
- load function......page 0021
-
- line# loc code line
-
- 00858 0702 ;
- 00859 0702 20 28 09 jsr loding ;tell user loading
- 00860 0705 ;
- 00861 0705 a9 fd ld40 lda #$fd ;mask off timeout
- 00962 0707 25 96 and status
- 00863 0709 9596 sta status
- 00864 07db ;
- 00865 07db 20 aa 08 jsr stop ;stop key?
- 00866 07de do 03 bne ld45 ;no...
- 00867 07e0 ;
- 00968 07e0 4c 78 08 jmp break ;stop key pressed
- 00069 07e3 ;
- 00870 07e3 20 fd 09 ld45 jsr acptr ;get byte off ieee
- 00971 07e6 aa tax
- 00072 07e7 a5 96 lda status ;was there a timeout?
- 00873 07e9 4a lsr a
- 00874 07ea 4a lsr a
- 00875 07eb bo es bcs ld40 ;yes...try again
- 00976 07ed 8a txa
- 00877 07ee ao 00 ldy #0
- 00879 07f0 91 oe sta (eal)y
- 00679 07f2 e6 oe ld60 inc eal ;tncrement store addr
- 00090 07f4 do 02 bne ld64
- 00881 07f6 e6 of inc eah
- 00892 07f8 24 96 ld64 bit status ;eoi?
- 00883 07fa 50 09 bvc ld40 ;no...continue load
- 00994 07fc ;
- 00895 07fc 20 od oa jsr untlk ;close channel
- 00986 07ff 20 oa 08 jsr clsei ;close the file
- 00887 0802 90 03 bcc ld180 ;branch always
- 00888 0804 ;
- 00629 0804 4c c3 08 ld90 jmp error4 ;file not found
- 00090 0807 ;
- 00891 0807 ;
- 00892 0807 16 ld180 clc ;good exit
- 00893 0808 ;
- 00894 0808 ;set up end load address
- 00895 0808 ;
- 00896 0808 a6 oe ldx eal
- 00897 080a a4 0f ldx eah
- 00898 080c ;
- 00899 oboc 60 ld190 rts
-
- 00901 o80d ;suprduiine to print to console:
- 00902 obod ;
- 00903 obod ;searching [for name]
- 00904 oood ;
- 00905 09od luking
- 00906 obod a0 oc ldy #ms5-ms1 ;"searching"
- 00907 ooof 20 62 09 jsr msg
- 00908 0812 a5 d1 lda fnlen
-
-
- load function......page 0022
-
- line# loc code line
-
- 00909 0814 fo 11 beq ld115
- 00910 0816 ao 17 ldy #ms6-ms1 ;"for"
- 00911 0818 20 62 09 jsr msg
-
- 00913 o81b ;subroutine to output file name
- 00914 081b ;
- 00915 081b outfn
- 00916 o81b ao 00 ldy #0
- 00917 081d b1 da ld110 lda (fnadr)y
- 00918 081f 20 81 09 jsr bsout
- 00919 0822 c8 iny
- 00920 0823 c4 d1 cpy fnlen
- 00921 0825 do f6 bne ld110
- 00922 0927 ;
- 00923 0927 60 ld115 rts
-
- 00925 0828 ;subroutine to print:
- 00926 0828 ;
- 00927 0828 ;loading/verifing
- 00928 0b28 ;
- 00929 0828 ao 39 loding ldy #ms10-ms1 ;assume 'loading'
- 00930 082a 4c 62 09 ld410 jmp spmsg
-
-
-
- save function......page 0023
-
- line# loc code line
-
- 00932 082d ;***********************************
- 00933 082d ;* save *
- 00934 082d ;* *
- 00935 082d ;* saves to cassette 1 or 2, or *
- 00936 082d ;* ieee devices 4>=n>=31 as select-*
- 00937 082d ;* ed by variable fa. *
- 00938 082d ;* *
- 00939 082d ;* start of save is memstr...end of*
- 00940 082d ;* save is .x,.y *
- 00941 082d ;***********************************
-
- 00943 082d a5 d4 save lda fa ***monitor entry
- 00944 082f c9 04 cmp #4
- 00945 0831 bo 03 bcs sv20
- 00946 0833 ;
- 00947 0833 4c 02 08 sv10 jmp error9 ;bad device
- 00948 0836 ;
- 00949 0836 sv20
- 00950 0836 a9 61 lda #$61
- 00951 0838 85 03 sta sa
- 00952 083a a4 d1 ldy fnlen
- 00953 083c do 03 bne sv25
- 00954 083e ;
- 00955 083e 4c cf 08 jmp error8 ;missing file name
- 00956 0841 ;
- 00957 0841 20 1e oa sv25 jsr openi
- 00958 0844 20 a1 08 jsr saving
- 00959 0947 a5 04 lda fa
- 00960 0849 20 9f 09 jsr listn
- 00961 084c a5 03 lda sa
- 00962 084e 20 af 09 jsr secnd
- 00963 0851 ao 00 ldy #0
- 00964 0853 a5 ob lda stah
- 00965 0855 85 od sta sah
- 00966 0857 a5 oa lda stal
- 00967 0959 85 oc sta sal
- 00968 0858 20 bf 09 jsr ciout
- 00969 085e a5 od lda sah
- 00970 0860 20 bf 09 jsr ciout
- 90971 0863 38 sv30 sec
- 00972 0964 a5 oc lda sal
- 00973 0866 e5 oe sbc eal
- 00974 0668 a5 od lda sah
- 90975 086a e5 of sbc eah
- 00976 os6c do 19 bcs sv50 ;have reached end
- 00977 086e b1 oc lda (sal)y
- 00978 0870 20 bf 09 jsr ciout
- 30979 0873 20 aa 09 jsr stop
- 00990 0b76 do 07 bne sv40
- 0o9b1 0878
- 30992 0878 20 sa 08 break jsr clsei
- 30983 087b a9 00 lda #0
- 30984 087d 38 sec
-
-
- save function......page 0024
-
- line# loc code line
-
- 00985 087e 60 rts
- 00986 097f ;
- 009b7 097f e6 oc sv40 inc sal
- 00999 0891 do 02 bne incr
- 00999 0893 e6 od inc sah
- 00990 0895 incr
- 00991 0985 do dc bne sv30
- 00992 0887 20 cf 09 sv50 jsr unlsn
-
- 00994 088a 24 d3 clsei bit sa
- 00995 obbc 30 11 bmi clsei2
- 00996 obbe a5 d4 lda fa
- 00997 0990 20 9f 09 jsr listn
- 00999 0893 a5 d3 lda sa
- 00999 0895 29 ef and #$ef
- 01000 0897 09 eo ora #$eo
- 01001 0999 20 af 09 jsr secnd
- 01002 os9c 20 cf 09 jsr unlsn
- 01003 089f ;
- 01004 089f 18 clsei2 clc
- 01005 obao 60 rts
-
- 01oo8 08a1 ;subroutine to output:
- 01009 08a1 ;'saving <file name>'
- 01010 08a1 ;
- 01011 oba1 saving
- 01012 08a1 ;
- 01013 08a1 ao 41 ldy #ms11-ms1 ;'saving'
- 01014 08a3 20 62 09 jsr msg
- 01015 08a6 20 1b 08 jsr outfn ;<file name>
- 31016 08a9 ;
- 31017 09a9 60 sav100 rts
-
-
- error handler......page 0025
-
- line# loc code line
-
- 01019 obaa ;***************************************
- 01020 obaa ;* stop -- check stop key flag and *
- 01021 obaa ;* return z flag set if flag true. *
- 01022 obaa ;* also closes active channels and *
- 01023 obaa ;* flushes keybdard queue. *
- 01024 obaa ;* also returns key downs from last *
- 01025 obaa ;* keyboard row in .a. *
- 01026 obaa ;***************************************
- 01027 obaa a5 9b stop lda stkey ;value of last row
- 01028 obac c9 ef cmp #$ef ;check siop key position
- 01029 obae 00 09 bne stop2 ;not down
- 01030 obbo ob php
- 01031 obb1 20 91 09 jsr clrch ;clear channels
- 01032 09b4 a9 00 lda #0
- 01033 0606 85 9e sta ndx ;flush gueue
- 01034 obdb 29 plp
- 01035 0889 60 stop2 rts
-
- 01037 08ba ;***********************************
- 01038 o8ba ;* *
- 01039 o8ba ;* error handler *
- 01040 o8ba ;* *
- 01041 obba ;* with error # in a and carry. *
- 01042 obba ;* *
- 01043 obba ;***********************************
- 01044 osba ;
- 01045 088a a9 01 error1 lda #1 ;too many files
- 01046 obbc 2c .byt $2c
- 01047 obbd a9 02 error2 lda #2 ;file open
- 01048 obbf 2c .byt $2c
- 01049 osco a9 03 error3 lda #3 ;file not open
- 01050 08c2 2c .byt $2c
- 01051 08c3 a9 04 error4 lda #4 ;file not found
- 01052 08c5 2c .byt $2c
- 01053 08c6 a9 05 error5 lda #5 ;device not present
- 01054 oscb 2c .byt $2c
- 01055 08c9 a9 06 error6 lda #6 ;not input file
- 01056 oscb 2c .byt $2c
- 01057 0Ecc a9 07 error7 lda #7 ;not output file
- 01058 osce 2c .byt $2c
- 01059 obcf a9 08 errors lda #8 ;missing file name
- 91060 0Ed1 2c .byt $2c
- 01061 09d2 a9 09 error9 lda #9 ;bad device #
- 01062 0Ed4 ;
- 01063 08d4 48 pha ;error number on stack
- 01064 09d5 20 91 09 jsr clrch ;restore i/0 channels
- 01065 obdb ;
- 01066 obdb ao 00 ldy #ms1-ms1
- 01067 obda ;
- 01068 obda 20 62 09 jsr msg ;print "cbm i/0 error #"
- 01069 osdd 66 pla
-
-
- error handler......page 0026
-
- line* loc code line
-
- 01070 obde 48 pha
- 01071 obuf 09 30 ora #$30 ;make error ascii
- 01072 obei 20 81 09 jsr bsout ;print it
- 01073 obe4 ;
- 01074 obe4 68 erexit pla
- 01075 obe5 39 sec
- 01076 obe6 60 rts
-
-
- messages......page 0027
-
- line# loc code line
-
- 01079 obe7 od ms1 .byt $d,'i/o error ',$a3
- 01078 obes 49 2f
- 01078 08f2 a3
- 01079 08f3 od ms5 .byt $d,'searching',$ao
- 01079 08f4 53 45
- 01079 o8fd ao
- 01080 obfe 46 4f 52 ms6 .byt 'for',$ao
- 01080 0901 ag
- 01081 0902 od ms7 .byt $d,'press play',$ao
- 01091 0903 50 52
- 01091 0900 ag
- 01082 090e 26 20 ms8 .byt '& record',$ao
- 01082 0916 ao
- 01083 0917 4f 4e ms9 .byt 'on tape ',$a3
- 01083 091f a3
- 01084 0920 od ms10 .byt $d,'loadin',$c7
- 01084 0921 4c 4f
- 01094 0927 c7
- 01095 0928 od ms11 .byt $d,'saving',$ao
- 010b5 0929 53 41
- 01065 092f ao
- 01096 0930 od ms21 .byt $d,'verifyin',$c7
- 01096 0931 56 45
- 01096 0939 c7
- 01087 093a od ms17 .byt $d,'found",$a0
- 01087 093b 46 4f
- 01097 0940 ao
- 010b8 0941 od ms18 .byt $d,'ok',$8d
- 01099 0942 4f 4b
- 01099 0944 sd
- 01089 0945 od ms34 .byt $d,'***cbm monitor 1.0***',$8d
- 31089 0946 2a 2a
- 21089 095b sd
- 01090 095C od ms36 .byt $d,'brea",$cb
- 31090 0950 42 52
- 21090 0961 cb
-
- 01092 0962 ;print message to screen only if
- 01093 0962 ;output enabled
- 01094 0962 ;
- 01095 0962 spmsg
- 01096 0962 59 e7 08 msg lda ms1,y
- 01097 0965 08 php
- 01098 0966 29 7f and #$7f
- 01099 0968 20 91 09 jsr bsout
- 01100 096b cb iny
- 01101 096c 28 plp
- 01102 0960 10 f3 bpl msg
- 01103 096f 18 msg10 clc
- 01104 0970 60 rts
-
-
- messages......page 0028
-
- line# loc code line
-
- 01106 0971 ;
- 01107 0971 basin
- 01109 0971 a9 00 lda #0
- 01109 0973 bd fo ff sta $fff0
- 01110 0976 20 cf ff jsr $ffcf
- 01111 0979 48 pha
- 01112 097a a5 09 lda memmap
- 01113 097c bd fo pf sta $fff0
- 01114 097f 6b pla
- 01115 0980 60 rts
-
- 01117 0981 bsout
- 01110 0961 48 pha
- 01119 09b2 a9 00 lda #0
- 01120 0984 50 fo ff sta $fff0
- 01121 0987 60 pla
- 01122 0999 20 d2 ff jsr $ffd2
- 01123 099b a5 09 lda memmap
- 01124 0980 50 fo ff sta $fff0
- 01125 0990 60 rts
-
- 01127 0991 a9 00 clrch lda #0
- 01128 0993 sd fo ff sta $fff0
- 01129 0996 20 a6 f2 jsr rclrch
- 01130 0999 a5 09 lda memmap
- 01131 099b gd fo ff sta $fff0
- 01132 099e 60 rts
-
- 01134 099f 95 d4 listn sta fa
- 01135 09a1 a9 00 lda #0
- 01136 09a3 00 fo ff sta $fff0
- 01137 09a6 20 d5 fo jsr rlistn
- 01138 09a9 a5 09 lda memmap
- 01139 09a0 50 fo ff sta $fff0
- 01140 09ae 60 rts
-
- 01142 09af 49 secnd pha
- 01143 09b0 a9 00 lda #0
- 01144 09b2 bd fo ff sta $fff0
-
-
- messages......page 0029
-
- line# loc code line
-
- 01145 09b5 68 pla
- 01146 09b6 20 43 fL jsr rsecnd
- 01147 09b9 a5 09 lda memmap
- 01148 09bb bd fo ff sta $fff0
- 01149 09be 60 rts
-
- 01151 099f 48 ciout pha
- 01152 09c0 a9 00 lda #0
- 01153 09c2 bd fo ff sta $fff0
- 01154 09c5 68 pla
- 01155 09c6 20 9e fL jsr rciout
- 01156 09c9 a5 09 lda memmap
- 01157 09c8 bd fo ff sta $fff0
- 0115b 09ce 60 rts
-
- 01160 09cf unlsn
- 01161 09cf a9 00 lda #0
- 01162 0901 bd fo ff sta $fff0
- 01163 09d4 20 b9 fL jsr runlsn
- 01164 09d7 a5 09 lda memmap
- 01165 09d9 od fo ff sta $fff0
- 01166 09dc 60 rts
-
- 01168 09dd 85 d4 talk sta fa
- 01169 09df a9 00 lda #0
- 01170 09e1 bd fo ff sta $fff0
- 31171 09e4 20 d2 fo jsr rtalk
- 11172 09e7 a5 09 lda memmap
- 01173 09e9 bd fo ff sta $fff0
- 31174 09ec 60 rts
-
- 01176 09ed 48 tksa pha
- 01177 09ee a9 00 lda #0
- 01178 09f0 00 fo ff sta $fff0
- 31179 09f3 68 pla
- 01180 09f4 20 93 fL jsr rtksa
- 01181 09f7 a5 09 lda memmap
- 01182 09f9 00 fo ff sta $fff0
- 31183 09fc 60 rts
-
-
- messages......page 0030
-
- line# loc code line
-
- 01185 09fd acptr
- 01186 09fd a9 00 lda #0
- 01187 09ff 50 fo ff sta $fff0
- 01188 0a02 20 co fL jsr racptr
- 01189 0a05 48 pha
- 01190 0a06 a5 09 lda memmap
- 01191 oaob bd fo ff sta $fff0
- 01192 oaob 68 pla
- 01193 oaoc 60 rts
-
- 01195 oaod untlk
- 01196 gaod a9 00 lda #0
- 01197 oaof bd fo ff sta $fff0
- 01198 0a12 20 ae fL jsr runtlk
- 01199 0a15 a5 09 lda memmap
- 01200 0a17 bd fo ff sta $fff0
- 01201 oaia 60 rts
-
- 01203 oaib 48 openi pha
- 01204 oaic a9 00 lda #0
- 01205 oaie bd fo ff sta $fff0
- 01206 0a21 68 pla
- 01207 0a22 20 a5 f4 jsr ropeni
- 01208 0a25 a5 09 lda memmap
- 01209 0a27 bd fo ff sta $fff0
- 01210 0a2a 60 rts
- 01211 0a2b .end
-
- errors = 00000
-
- symbol table
-
- symbol value
- a4 0616 a5 0618 a6 0627 a9 062b
- acc 0003 acptr 09fd altm 060f altr 05f5
- altrit 0545 asc1 06f4 ascii 06ed b1 0492
- b3 0498 b5 04a4 bad 0100 basin 0971
- beqs1 05f1 break 0878 bsout 0981 buf 0200
- cbinv 0092 cinv 0090 ciout 09bf clrch 0991
- clsei 088a clsei2 089f cmdend 0531 cmds 0516
- cr 0ood crlf 0553 d2 0575 disk 074b
- disk1o 0767 disk15 076a disk20 0776 disk25 0787
- disk5 0764 dm 0599 dm1 059d dm2 05af
- dsp1 05cc dsp10 05c9 dsplym 05b4 dsplyr 0573
-
- symbol table
-
- symbol value
- eah ooof eal oooe erexit 08e4 errl 065b
- erropr 04ad error1 o8ba error2 08b0 error3 o8co
- error4 08c3 error5 08c6 error6 08c9 error7 08cc
- error8 o8cf error9 o8d2 errs1 05f2 fa 0004
- flgs 0002 fnadr ooda fnlen 00d1 g1 063f
- g2 064d go 0632 hex09 0744 hexit 073a
- incr 0885 init 040f invh 0007 invl 0008
- irq 0440 l1 0663 l12 06a4 l13 06b3
- l14 06ce l15 06d9 l2 066e l20 06c5
- l3 0670 l4 0680 l5 0684 l8 068d
- l9 0694 ld 065e ld10 07a0 ld110 081d
- ld115 0b27 ld180 0807 ld190 080c ld20 07a3
- ld25 07ae ld40 07d5 ld410 082a ld45 07e3
- ld60 07f2 ld64 07f8 ld90 0804 listn 099f
- load 0796 loding 0828 luking o8od mapper 062c
- memmap 0009 ms1 o8e7 ms10 0920 ms11 0928
- ms17 093a ms18 0941 ms21 0930 ms34 0945
- ms36 095c ms5 o8f3 ms6 08fe ms7 0902
- ms8 090e ms9 0917 msg 0962 msg10 096f
- ndx 009e nmi 0459 openi 0a1b outfn 081b
- outqst 0550 pch 0000 pcl 0001 prend 0655
- putp 0531 racptr f1c0 rciout f19e rclrch f2a6
- rdoa 0709 rdoa2 0715 rdob 0716 rdob4 0739
- rdoc 0745 regk 0558 rlistn f0d5 ropeni f4a5
- rsecnd f143 rtalk f0d2 rtip 0472 rtksa f193
- runlsn f1b9 runtlk f1ae s0 04c4 s1 04d2
- s2 04e6 s3 04ef s4 0500 s6 0515
- sa 00d3 sah oood sal 000c savioo 08a9
- save 082d saving 08a1 savx 0015 secnd 09af
- setirq 042b setr 053a sp 0006 space 054d
- spmsg 0962 st1 04bd stah ooob stal 000a
- status 0096 stkey 009b stop o8aa stop2 08b9
- strtm1 04b1 sv10 0833 sv20 0836 sv25 0841
- sv30 0863 sv40 087f sv50 0887 sys 009e
- t2t2 06f9 t2t21 06fb talk 09dd timb 0488
- timc 047a tksa 09ed tmp0 0010 tmp2 0012
- tmpa 0017 tmpc 0014 tmpps 0018 unlsn 09cf
- untlk 0a0d wrap 0016 wroa 06dc wrob 06e1
- xr 0004 yr 0005
- end of assembly
-
-
-