home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar - Compleat Programmer
/
comprog1.d81
/
bs.pal
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-28
|
5KB
|
274 lines
100 open2,9,1,"0:bugsc.52300"
110 sys700
120 ;
130 *=52300
140 ;
150 .opt o2
160 ;
170 ptr = $22
180 channl = $13
190 curlin = $39
200 linnum = $14
210 txtptr = $7a
220 temp = $02
230 temp1 = $49
240 err = $02a7
250 row = $02a8
260 col = $02a9
270 print = $ab47
280 errtab = $a326
290 linkprg = $a533
300 clear = $a659
310 init = $a67a
320 error = $a36a
330 strout = $ab1e
340 fndlin = $a613
350 stop = $a82c
360 linprt = $bdcd
370 reslst = $a09e
380 warm1 = $e38b
390 list = $a6c9
400 ready1 = $a47b
410 nrmerr = $a43a
420 ierror = $0300
430 clrchn = $ffcc
440 plot = $fff0
450 ;
460 jsr linkprg ;re-set program pntrs
470 clc ; so user doesn't have
480 lda ptr ; to type new
490 adc #2
500 sta $2d
510 lda ptr+1
520 adc #0
530 sta $2e
540 jsr clear
550 lda #12 ;set border color
560 sta $d020 ;
570 lda #0 ;set background color
580 sta $d021 ;
590 ;
600 lda 646 ;
610 pha ;
620 ;
630 jsr title ;display title
640 lda ierror+1 ;set/reset
650 cmp #$e3 ; debug wedge
660 beq e1
670 ;
680 ldx #7
690 .byte $2c
700 e1 ldx #3
710 lda mtab,x
720 sta ierror+1
730 dex
740 lda mtab,x
750 sta mtab,x
760 sta ierror
770 stx $02
780 lda #<ms6
790 ldy #>ms6
800 jsr strout
810 ldx $02
820 dex
830 ldy mtab,x
840 dex
850 lda mtab,x
860 jsr strout
870 ;
880 pla ;
890 sta 646 ;
900 ;
910 jmp $a474
920 ;
930 start cpx #$30 ;error code?
940 bcc entry ;yes, continue
950 jmp warm1 ;no, exit
960 ;
970 entry lda curlin+1
980 cmp #$ff ;"direct mode?
990 bne entry1 ;no, [154]inue
1000 jmp nrmerr ;yes, exit
1010 ;
1020 entry1 stx err ;[148] err[176]
1030 lda #0 ;reset basic
1040 sta channl
1050 jsr init
1060 ;
1070 lda 646 ;[148] char col[176]
1080 pha ;
1090 ;
1100 lda #[179]ms1 ;display err[176]
1110 ldy #[177]ms1 ; message
1120 jsr strout
1130 lda err
1140 asl a
1150 tax
1160 lda errtab,x
1170 sta ptr
1180 lda errtab[170]1,x
1190 sta ptr[170]1
1200 ldy #0
1210 eloop lda (ptr),y
1220 pha
1230 [175] #$7f
1240 jsr [153]
1250 iny
1260 pla
1270 bpl eloop
1280 lda #[179]ms2
1290 ldy #[177]ms2
1300 jsr strout
1310 ;
1320 lda $d021 ;
1330 [175] #15 ;
1340 cmp #1 ;
1350 beq floyd ;
1360 lda #5 ;
1370 .byte $2c
1380 floyd lda #144
1390 jsr $ffd2 ;
1400 ;
1410 lda curlin ;[161] basic
1420 ldx curlin[170]1 ; line number.
1430 sta linnum ;find address
1440 stx linnum[170]1 ; of basic line
1450 jsr [165]dlin
1460 sec ;calculate [185]iti[145]
1470 lda txtptr ; of err[176] in
1480 sbc $5f ; basic line
1490 sta temp
1500 jsr l1 ;[155] [164] crt.
1510 ;
1520 pla ;[140] char col[176]
1530 sta 646 ;
1540 ;
1550 ldx row ;set curs[176]
1560 ldy col ; [185]iti[145] [145]
1570 clc ; basic line
1580 jsr plot
1590 ldx #3 ;reset screen
1600 l0 lda btab,x ; edi[164]r po[181]ers
1610 sta $0277,x
1620 dex
1630 bpl l0
1640 lda #4
1650 sta $c6
1660 jmp [135]y1 ;exit [164] basic
1670 ;
1680 l1 ldy #1 ;list routine
1690 sty $0f
1700 lda ($5f),y
1710 beq l7
1720 iny
1730 lda ($5f),y
1740 tax
1750 iny
1760 lda ($5f),y
1770 l3 sty temp1
1780 jsr linprt
1790 lda #$20
1800 l4 ldy temp1
1810 [175] #$7f
1820 l5 jsr [153]
1830 cmp #34
1840 bne l6
1850 lda $0f
1860 e[176] #$ff
1870 sta $0f
1880 l6 iny
1890 beq l7
1900 cpy temp
1910 bne l12
1920 tya
1930 pha
1940 sec
1950 jsr plot ;save screen
1960 stx row ;[185]iti[145] at
1970 sty col ;err[176] locati[145]
1980 pla
1990 tay
2000 l12 lda ($5f),y
2010 bne l8
2020 l7 rts
2030 l8 bpl l5
2040 cmp #$ff
2050 beq l5
2060 bit $0f
2070 bmi l5
2080 sec
2090 sbc #$7f
2100 tax
2110 sty temp1
2120 ldy #$ff
2130 l9 dex
2140 beq l11
2150 l10 iny
2160 lda reslst,y
2170 bpl l10
2180 bmi l9
2190 l11 iny
2200 lda reslst,y
2210 bmi l4
2220 jsr [153]
2230 bne l11
2240 fil lda #13
2250 jsr $ffd2
2260 ldy #7
2270 fil2 lda #$20
2280 jsr $ffd2
2290 dey
2300 bne fil2
2310 lda #$12
2320 jsr $ffd2
2330 lda #$1f
2340 jmp $ffd2
2350 ;
2360 title lda #0
2370 sta $2
2380 lp1 ldy $2
2390 lda ms3,y
2400 bne lp4
2410 jsr fil
2420 jmp lp8
2430 lp4 cmp #255
2440 bne lp6
2450 rts
2460 lp6 jsr $ffd2
2470 lp8 inc $2
2480 jmp lp1
2490 ;
2500 ;
2510 ;
2520 ms1 .byte $93,$1c,$5b,0
2530 ms2 .[198] " error]"
2540 .byte 13,13,0
2550 ms3 .byte $93,9,142,0
2560 .[198] "step"
2570 .byte $9a
2580 .[198] " "
2590 .byte 0,$20,$9a
2600 .[198] " loadstar presents "
2610 .byte 0,$20,$9a
2620 .[198] " bug scout "
2630 .byte 0,$20,$9a
2640 .[198] " by rick nash "
2650 .byte 0,$20,$9a
2660 .[198] " (c) softdisk publishing "
2670 .byte 0,$20,$9a
2680 .[198] " "
2690 .byte 0
2700 .[198] " "
2710 .byte 146
2720 .[198] "step"
2730 .byte 13,13,13,255
2740 ms4 .[198] "installed"
2750 .byte 13,13,0
2760 ms5 .[198] "removed"
2770 .byte 13,13,0
2780 ms6 .byte 159
2790 .[198] " bug scout is now "
2800 .byte 0
2810 mtab .w[176]d ms4,start,ms5,$e38b
2820 btab .byte $11,$11,$91,$91