comparison 3rdparty/packages/basic09/runb.asm @ 682:d12f1a5c5e31

Made source enhancements
author boisy
date Sun, 29 Dec 2002 21:54:49 +0000
parents 0ef2294df11f
children a27b7ceba2e9
comparison
equal deleted inserted replaced
681:48c56efd777b 682:d12f1a5c5e31
365 std <u002D 365 std <u002D
366 sta <u00BD 366 sta <u00BD
367 lda #$03 close paths 4-16 367 lda #$03 close paths 4-16
368 L01D0 os9 I$Close 368 L01D0 os9 I$Close
369 inca 369 inca
370 cmpa #$10 370 cmpa #16
371 bcs L01D0 371 bcs L01D0
372 lda #$02 372 lda #$02
373 os9 I$Dup 373 os9 I$Dup
374 sta <u00BE 374 sta <u00BE
375 clr <u0035 375 clr <u0035
562 sta <u0035 562 sta <u0035
563 bsr L0391 563 bsr L0391
564 clr <u0035 564 clr <u0035
565 rts 565 rts
566 L037D comb 566 L037D comb
567 ldb #$2B 567 ldb #E$UnkPrc
568 rts 568 rts
569 L0381 ldy <u0082 569 L0381 ldy <u0082
570 lda #$2A 570 lda #$2A
571 sta ,y 571 sta ,y
572 sta <u0035 572 sta <u0035
636 stu [,s] 636 stu [,s]
637 L040C puls pc,u,y,x 637 L040C puls pc,u,y,x
638 638
639 L040E os9 F$PErr 639 L040E os9 F$PErr
640 rts 640 rts
641
642 UNID1
641 pshs b,a 643 pshs b,a
642 bra L0426 644 bra L0426
643 L0416 pshs y,x 645 L0416 pshs y,x
644 L0418 lda ,x+ 646 L0418 lda ,x+
645 cmpa #$FF 647 cmpa #$FF
986 leax d,x 988 leax d,x
987 stx $04,s 989 stx $04,s
988 puls pc,x,b,a 990 puls pc,x,b,a
989 L06E8 neg <u0002 991 L06E8 neg <u0002
990 rts 992 rts
993
994 UNID2
991 pshs x,b,a 995 pshs x,b,a
992 ldb [<$04,s] 996 ldb [<$04,s]
993 leax <L06FB,pcr 997 leax <L06FB,pcr
994 ldd b,x 998 ldd b,x
995 leax d,x 999 leax d,x
1541 leax $03,x 1545 leax $03,x
1542 L0ADE ldy <u0031 1546 L0ADE ldy <u0031
1543 ldu <$14,y 1547 ldu <$14,y
1544 cmpu <u004A 1548 cmpu <u004A
1545 bhi L0AEE 1549 bhi L0AEE
1546 ldb #$35 error 53 1550 ldb #E$SubOvf
1547 lbra L0EDC 1551 lbra L0EDC
1548 L0AEE stx ,--u 1552 L0AEE stx ,--u
1549 stu <$14,y 1553 stu <$14,y
1550 stu <u0046 1554 stu <u0046
1551 addd <u005E 1555 addd <u005E
1608 L0B63 clr <u0013,u 1612 L0B63 clr <u0013,u
1609 leax $02,x 1613 leax $02,x
1610 rts 1614 rts
1611 1615
1612 CREATE bsr L0B87 1616 CREATE bsr L0B87
1613 ldb #$0B 1617 ldb #PREAD.+UPDAT.
1614 os9 I$Create 1618 os9 I$Create
1615 bra L0B77 1619 bra L0B77
1616 1620
1617 OPEN bsr L0B87 1621 OPEN bsr L0B87
1618 os9 I$Open 1622 os9 I$Open
1641 ldb #$0E 1645 ldb #$0E
1642 lbsr L0733 1646 lbsr L0733
1643 lbcs L0EDE 1647 lbcs L0EDE
1644 rts 1648 rts
1645 1649
1646 L0BAF fcc /? / 1650 InputPrompt fcc /? /
1647 L0BB0 fcb $ff 1651 L0BB0 fcb $ff
1648 1652
1649 L0BB2 fcc "** Input error - reenter **" 1653 L0BB2 fcc "** Input error - reenter **"
1650 fcb C$CR,$ff 1654 fcb C$CR,$ff
1651 1655
1662 jsr <u0016 1666 jsr <u0016
1663 pshs x 1667 pshs x
1664 ldx $01,y 1668 ldx $01,y
1665 bra L0BEF 1669 bra L0BEF
1666 L0BEA pshs x 1670 L0BEA pshs x
1667 leax <L0BAF,pcr 1671 leax <InputPrompt,pcr
1668 L0BEF bsr Sprint 1672 L0BEF bsr Sprint
1669 puls x 1673 puls x
1670 lda <u007F 1674 lda <u007F
1671 cmpa <u002E 1675 cmpa <u002E
1672 bne L0BFD 1676 bne L0BFD
1701 leas $02,s 1705 leas $02,s
1702 L0C3C leas $03,s 1706 L0C3C leas $03,s
1703 coma 1707 coma
1704 rts 1708 rts
1705 1709
1710 * Entry: X = address of string to print
1706 Sprint pshs y 1711 Sprint pshs y
1707 leas -$06,s 1712 leas -$06,s
1708 leay ,s 1713 leay ,s
1709 stx $01,y 1714 stx $01,y
1710 ldd <u0080 1715 ldd <u0080
2309 UNK5 lbsr L0730 2314 UNK5 lbsr L0730
2310 leax >L0736,pcr 2315 leax >L0736,pcr
2311 stx <table1 2316 stx <table1
2312 rts 2317 rts
2313 2318
2319 UNID3
2314 pshs x,b,a 2320 pshs x,b,a
2315 ldb [<$04,s] 2321 ldb [<$04,s]
2316 leax <L10EF,pcr 2322 leax <L10EF,pcr
2317 ldd b,x 2323 ldd b,x
2318 leax d,x 2324 leax d,x
2319 stx $04,s 2325 stx $04,s
2320 puls pc,x,b,a 2326 puls pc,x,b,a
2321 2327
2322 L10EF fcb $14 2328 L10EF fdb UNK12-L10EF
2323 fdb $3401,$6403,$9504,$b706,$1808,$2d09,$1f08 2329 fdb L1253-L10EF
2324 fcb $e7 2330 fdb RLADD-L10EF
2331 fdb L15A6-L10EF
2332 fdb L1707-L10EF
2333 fdb RLCMP-L10EF
2334 fdb FIX-L10EF
2335 fdb FLOAT-L10EF
2325 2336
2326 L10FF jsr <u001B 2337 L10FF jsr <u001B
2327 fcb $08 2338 fcb $08
2328 L1102 jsr <u0024 2339 L1102 jsr <u0024
2329 fcb $06 2340 fcb $06
2735 rolb 2746 rolb
2736 bra L1438 2747 bra L1438
2737 2748
2738 L1401 ldd $01,y 2749 L1401 ldd $01,y
2739 bne L140A 2750 bne L140A
2740 ldb #$2D error 45 2751 ldb #E$DivZer
2741 lbra L1102 2752 lbra L1102
2742 L140A ldd $07,y 2753 L140A ldd $07,y
2743 bne L1413 2754 bne L1413
2744 L140E leay $06,y 2755 L140E leay $06,y
2745 std $03,y 2756 std $03,y
3454 Rgt bsr RLCMP 3465 Rgt bsr RLCMP
3455 bgt L18D8 3466 bgt L18D8
3456 bra L18DC 3467 bra L18DC
3457 3468
3458 RLCMP pshs y 3469 RLCMP pshs y
3459 andcc #$F0 3470 andcc #Entire+FIRQMask+HalfCrry+IRQMask
3460 lda $08,y 3471 lda $08,y
3461 bne L1934 3472 bne L1934
3462 lda $02,y 3473 lda $02,y
3463 beq L1932 3474 beq L1932
3464 L1928 lda $05,y 3475 L1928 lda $05,y
3465 L192A anda #$01 3476 L192A anda #$01
3466 bne L1932 3477 bne L1932
3467 L192E andcc #$F0 3478 L192E andcc #Entire+FIRQMask+HalfCrry+IRQMask
3468 orcc #$08 3479 orcc #Negative
3469 L1932 puls pc,y 3480 L1932 puls pc,y
3470 L1934 lda $02,y 3481 L1934 lda $02,y
3471 bne L193E 3482 bne L193E
3472 lda $0B,y 3483 lda $0B,y
3473 eora #$01 3484 eora #$01
3489 bne L1964 3500 bne L1964
3490 lda u0005,u 3501 lda u0005,u
3491 cmpa $05,y 3502 cmpa $05,y
3492 beq L1932 3503 beq L1932
3493 L1964 bcs L192E 3504 L1964 bcs L192E
3494 andcc #$F0 3505 andcc #Entire+FIRQMask+HalfCrry+IRQMask
3495 puls pc,y 3506 puls pc,y
3496 3507
3497 SCPCNST clrb 3508 SCPCNST clrb
3498 stb <u003E 3509 stb <u003E
3499 L196D ldu <u0048 3510 L196D ldu <u0048
3974 puls x 3985 puls x
3975 lbra RLADD 3986 lbra RLADD
3976 3987
3977 L1CD8 fcb $00,$b1,$72,$17,$f8 3988 L1CD8 fcb $00,$b1,$72,$17,$f8
3978 3989
3979 L1CDD fcb $1d 3990 L1CDD sex
3980 fdb $2a01 3991 bpl L1CE1
3981 fcb $50 3992 negb
3982 L1CE1 anda #$01 3993 L1CE1 anda #$01
3983 pshs b,a 3994 pshs b,a
3984 leau >L1CD8,pcr 3995 leau >L1CD8,pcr
3985 lbsr RCPVAR 3996 lbsr RCPVAR
3986 ldb $05,y 3997 ldb $05,y
4108 leax >$005F,x 4119 leax >$005F,x
4109 stx <u0097 4120 stx <u0097
4110 lbra L206A 4121 lbra L206A
4111 L1DEF leay -$06,y 4122 L1DEF leay -$06,y
4112 lbpl L15B0 4123 lbpl L15B0
4113 ldb #$32 error 50 4124 ldb #E$FltOvf
4114 lbra L1102 4125 lbra L1102
4115 4126
4116 L2125 pshs x 4127 L2125 pshs x
4117 bsr L1E30 4128 bsr L1E30
4118 ldd $01,y 4129 ldd $01,y
4588 ror u0001,u 4599 ror u0001,u
4589 inc ,u 4600 inc ,u
4590 L21FB rts 4601 L21FB rts
4591 4602
4592 L21FC fdb $0c90,$fdaa 4603 L21FC fdb $0c90,$fdaa
4593 L2200 fdb $2207,$6b19,$c158,$03eb,$6ebf,$2601,$fd5b,$a9ab 4604 fdb $2207,$6b19,$c158,$03eb,$6ebf,$2601,$fd5b,$a9ab
4594 L2210 fdb $00ff,$aadd,$b900,$7ff5,$56ef,$003f,$feaa,$b700 4605 fdb $00ff,$aadd,$b900,$7ff5,$56ef,$003f,$feaa,$b700
4595 L2220 fdb $1fff,$d556,$000f,$fffa,$ab00,$07ff,$ff55,$0003 4606 fdb $1fff,$d556,$000f,$fffa,$ab00,$07ff,$ff55,$0003
4596 L2230 fdb $ffff,$eb00,$01ff,$fffd,$0001,$0000 4607 fdb $ffff,$eb00,$01ff,$fffd,$0001,$0000
4597 fcb $00 4608 fcb $00
4598 L223D fcb $00 4609 L223D fcb $00
4599 fdb $9b74 4610 fdb $9b74
4600 L2240 fdb $eda8 4611 fdb $eda8
4601 L2242 fdb $0b17,$217f,$7e06,$7cc8,$fb30,$0391,$fef8 4612 L2242 fdb $0b17,$217f,$7e06,$7cc8,$fb30,$0391,$fef8
4602 L2250 fdb $f301,$e270,$76e3,$00f8,$5186,$0100,$7e0a,$6c3a 4613 fdb $f301,$e270,$76e3,$00f8,$5186,$0100,$7e0a,$6c3a
4603 L2260 fdb $003f,$8151,$6200,$1fe0,$2a6b,$000f,$f805,$5100 4614 fdb $003f,$8151,$6200,$1fe0,$2a6b,$000f,$f805,$5100
4604 L2270 fdb $07fe,$00aa,$0003,$ff80,$1500,$01ff,$e003,$0000 4615 fdb $07fe,$00aa,$0003,$ff80,$1500,$01ff,$e003,$0000
4605 L2280 fdb $fff8,$0000,$007f,$fe00,$0000,$3fff,$8000,$001f 4616 fdb $fff8,$0000,$007f,$fe00,$0000,$3fff,$8000,$001f
4606 L2290 fdb $ffe0,$0000,$0fff,$f800,$0007,$fffe,$0000,$0400 4617 fdb $ffe0,$0000,$0fff,$f800,$0007,$fffe,$0000,$0400
4607 L22a0 fcb $00 4618 fcb $00
4608 L22A1 fcb $0e 4619 L22A1 fcb $0e
4609 fdb $1214,$a2bb,$40e6,$2d36,$1962 4620 fdb $1214,$a2bb,$40e6,$2d36,$1962
4610 fcb $e9 4621 fcb $e9
4611 4622
4612 RND clra 4623 RND clra
4943 L251B clra 4954 L251B clra
4944 std $01,y 4955 std $01,y
4945 lda #$03 4956 lda #$03
4946 sta ,y 4957 sta ,y
4947 rts 4958 rts
4948 ldb #$06 4959
4960 UNK12 ldb #$06
4949 pshs y,x,b 4961 pshs y,x,b
4950 tfr dp,a 4962 tfr dp,a
4951 ldb #$50 4963 ldb #$50
4952 tfr d,y 4964 tfr d,y
4953 leax >L22A1,pcr 4965 leax >L22A1,pcr
4962 lda #$7E 4974 lda #$7E
4963 sta <u0016 4975 sta <u0016
4964 leax >L1214,pcr 4976 leax >L1214,pcr
4965 stx <u0017 4977 stx <u0017
4966 puls pc,y,x,b 4978 puls pc,y,x,b
4979
4967 pshs x,b,a 4980 pshs x,b,a
4968 ldb [<$04,s] 4981 ldb [<$04,s]
4969 leax <L2561,pcr 4982 leax <L2561,pcr
4970 ldd b,x 4983 ldd b,x
4971 leax d,x 4984 leax d,x
5100 rts 5113 rts
5101 L26A3 leas $02,s 5114 L26A3 leas $02,s
5102 L26A5 leas $01,s 5115 L26A5 leas $01,s
5103 L26A7 ldb #$3C 5116 L26A7 ldb #$3C
5104 bra L26AD 5117 bra L26AD
5105 err59 ldb #$3B 5118 err59 ldb #E$IONum
5106 L26AD stb <u0036 5119 L26AD stb <u0036
5107 coma 5120 coma
5108 puls pc,u 5121 puls pc,u
5109 L26B2 eora #$45 5122 L26B2 eora #$45
5110 anda #$DF 5123 anda #$DF
5239 L27BF cmpa #$02 5252 L27BF cmpa #$02
5240 beq L27C6 5253 beq L27C6
5241 lbsr Flote 5254 lbsr Flote
5242 L27C6 lbsr L2851 5255 L27C6 lbsr L2851
5243 bcs L27D2 5256 bcs L27D2
5244 ldb #$3D error 61 5257 ldb #E$Illinp
5245 stb <u0036 5258 stb <u0036
5246 coma 5259 coma
5247 puls pc,x 5260 puls pc,x
5248 L27D2 stx <u0082 5261 L27D2 stx <u0082
5249 clra 5262 clra
5263 ldx <u0082 5276 ldx <u0082
5264 lbsr AtoITR 5277 lbsr AtoITR
5265 bcs L27BD 5278 bcs L27BD
5266 cmpa #$01 5279 cmpa #$01
5267 beq L27C6 5280 beq L27C6
5268 err58 ldb #$3A 5281 err58 ldb #E$IOMism
5269 stb <u0036 5282 stb <u0036
5270 coma 5283 coma
5271 puls pc,x 5284 puls pc,x
5272 5285
5273 * verify string 5286 * verify string
5304 cmpa #$74 5317 cmpa #$74
5305 beq L2846 5318 beq L2846
5306 eora #$46 5319 eora #$46
5307 anda #$DF 5320 anda #$DF
5308 beq L2848 5321 beq L2848
5309 ldb #$3A 5322 ldb #E$IOMism
5310 stb <u0036 5323 stb <u0036
5311 coma 5324 coma
5312 puls pc,x 5325 puls pc,x
5313 L2846 com $02,y 5326 L2846 com $02,y
5314 L2848 bsr L2851 5327 L2848 bsr L2851
5890 incb 5903 incb
5891 tst ,y 5904 tst ,y
5892 bne L2C63 5905 bne L2C63
5893 L2C74 ldb #$3F 5906 L2C74 ldb #$3F
5894 bra L2C7A 5907 bra L2C7A
5895 L2C78 ldb #$3E 5908 L2C78 ldb #E$IOFRpt
5896 L2C7A stb <u0036 5909 L2C7A stb <u0036
5897 coma 5910 coma
5898 puls pc,y,x 5911 puls pc,y,x
5912
5899 L2C7F stb <u0085 5913 L2C7F stb <u0085
5900 ldd $01,y 5914 ldd $01,y
5901 leay d,y 5915 leay d,y
5902 bsr L2C8F 5916 bsr L2C8F
5903 bcc L2C8B 5917 bcc L2C8B
5904 ldb #$01 5918 ldb #$01
5905 L2C8B stb <u0086 5919 L2C8B stb <u0086
5906 jmp ,y 5920 jmp ,y
5921
5907 L2C8F bsr L2CA9 5922 L2C8F bsr L2CA9
5908 bcs L2CB8 5923 bcs L2CB8
5909 tfr a,b 5924 tfr a,b
5910 bsr L2CA9 5925 bsr L2CA9
5911 bcs L2CB5 5926 bcs L2CB5
5916 tsta 5931 tsta
5917 beq L2CA5 5932 beq L2CA5
5918 clrb 5933 clrb
5919 L2CA5 lda ,x+ 5934 L2CA5 lda ,x+
5920 bra L2CB5 5935 bra L2CB5
5936
5921 L2CA9 lda ,x+ 5937 L2CA9 lda ,x+
5922 L2CAB cmpa #$30 5938 L2CAB cmpa #'0
5923 bcs L2CB8 5939 bcs L2CB8
5924 cmpa #$39 5940 cmpa #'9
5925 bhi L2CB8 5941 bhi L2CB8
5926 suba #$30 5942 suba #'0
5927 L2CB5 andcc #^Carry 5943 L2CB5 andcc #^Carry
5928 rts 5944 rts
5929 L2CB8 orcc #Carry 5945 L2CB8 orcc #Carry
5930 rts 5946 rts
5931 L2CBB pshs a 5947 L2CBB pshs a
5932 lda #$0A 5948 lda #10
5933 mul 5949 mul
5934 addb ,s+ 5950 addb ,s+
5935 adca #$00 5951 adca #$00
5936 rts 5952 rts
5937 5953
6296 bls L2F8D 6312 bls L2F8D
6297 lda <u0089 6313 lda <u0089
6298 L2F8D sta <u008B 6314 L2F8D sta <u008B
6299 rts 6315 rts
6300 6316
6301 err48 ldb #$30 6317 err48 ldb #E$NoRout
6302 stb <u0036 6318 stb <u0036
6303 coma 6319 coma
6304 rts 6320 rts
6305 6321
6306 emod 6322 emod