Descargue aqu
0100 .OPT NO LIST
0110 ;
0120 ; GRABADOR SISTEMA NHP VER 3.6
0130 ;
0140 ; SAVE #D8:GRABB
0150 ;
0160 ;
0170 ; ASM,,#D8:GRABB.COM
0180 ;
0190 @LEN = LEN+2
0200 @LBAF = LEN+4
0210 PPILA = LEN+5
0220 PCRSR = $CB
0230 ORG = PCRSR
0240 SVMSC = $58
0250 POSXY = $54
0260 LENGHT = $4000
0270 BAFER = $4000
0280 FR0 = $D4
0290 CIX = $F2
0300 AFP = $D800
0310 IFP = $D9AA
0320 FPI = $D9D2
0330 FASC = $D8E6
0340 ZFR0 = $DA44
0350 FDIV = $DB28
0360 FMUL = $DADB
0370 FMOVE = $DDB6
0380 INBUFF = $F3
0390 LBUFF = $0580
0400 LLOAD = PAG7-LOAD
0410 LVBLANK = LOADER-VBLANK
0420 LAUTO = PAG4-PAG7
0430 BL4 = LAUTO/128
0440 LAST = LAUTO-128*BL4
0450 ;
0460 *= $2000
0470 .INCLUDE #D8:KEM2
0480 RY
0490 .BYTE 0,0
0500 LEN
0510 .BYTE 0,0,0,0,0,0
0520 CONT
0530 .BYTE 0,0
0540 STARTF
0550 .BYTE 0,0
0560 FINISH
0570 .BYTE 0,0
0580 @BL4
0590 .BYTE 0
0600 ?FILE
0610 .BYTE "D:"
0620 ??FILE
0630 .BYTE " "
0640 BBLQS
0650 .BYTE "000",$9B
0660 ALL
0670 .BYTE "D:*.*",$9B
0680 DNHP
0690 .BYTE $60,$00,$50,$80
0700 .WORD ??DIR
0710 .BYTE $35,$00,$00,$01,$00,$80
0720 BAKBYT
0730 .SBYTE "00000"
0740 BAKBLQ
0750 .SBYTE "000"
0760 TURBO
0770 .SBYTE "TURBO"
0780 FTURBO
0790 .BYTE $FF
0800 TON
0810 .SBYTE "ON "
0820 RESTORE
0830 LDY #19
0840 ?RESTORE
0850 LDA #$20
0860 STA ??FILE,Y
0870 LDA #$00
0880 STA NAME,Y
0890 STA FILE,Y
0900 DEY
0910 BPL ?RESTORE
0920 LDY #23
0930 ??RESTORE
0940 LDA #$00
0950 STA CRSR,Y
0960 DEY
0970 BPL ??RESTORE
0990 ???RESTORE
1000 LDA #$00
1010 STA FILE,Y
1020 DEY
1030 BPL ???RESTORE
1040 LDA #63
1050 STA CRSR
1060 STA FILE
1070 LDA #$10
1080 LDY #$04
1090 RESNUM
1100 STA BYTES,Y
1110 DEY
1120 BPL RESNUM
1130 STA BLOQUES
1140 STA BLOQUES+1
1150 STA BLOQUES+2
1160 LDA #$FF
1170 STA $D301
1180 RTS
1190 ASCINT
1200 CMP #32
1210 BCC ADD64
1220 CMP #96
1230 BCC SUB32
1240 CMP #128
1250 BCC REMAIN
1260 CMP #160
1270 BCC ADD64
1280 CMP #224
1290 BCC SUB32
1300 BCS REMAIN
1310 ADD64
1320 CLC
1330 ADC #64
1340 BCC REMAIN
1350 SUB32
1360 SEC
1370 SBC #32
1380 REMAIN
1390 RTS
1400 SETUR
1410 LDX #$04
1420 LOSTR
1430 LDA TURBO,X
1440 CMP CRSR,X
1450 BNE EXSTUR
1460 DEX
1470 BPL LOSTR
1480 LDA FTURBO
1490 EOR #$01
1500 STA FTURBO
1510 LDX #$02
1520 LOMVTR
1530 LDA TON,X
1540 PHA
1550 LDA TOF,X
1560 STA TON,X
1570 PLA
1580 STA TOF,X
1590 DEX
1600 BPL LOMVTR
1610 LDX #$00
1620 TXS
1630 JMP START
1640 EXSTUR
1650 RTS
1660 CLS
1670 LDX # ?DIR
1680 LDY # >??DIR
1690 STX PCRSR
1700 STY PCRSR+1
1710 LDY #$00
1720 LDX #$00
1730 ?CLS
1740 LDA #$00
1750 STA (PCRSR),Y
1760 INY
1770 BNE ??CLS
1780 INX
1790 INC PCRSR+1
1800 ??CLS
1810 CPY #104
1820 BNE ?CLS
1830 CPX #$01
1840 BNE ?CLS
1850 RTS
1860 OPEN
1870 LDX #$10
1880 LDA #$03
1890 STA $0342,X
1900 LDA #
1910 STA $0344,X
1920 LDA # >?FILE
1930 STA $0345,X
1940 LDA #$04
1950 STA $034A,X
1960 LDA #$80
1970 STA $034B,X
1980 JSR $E456
1990 DEY
2000 BNE DIR
2010 RTS
2020 CLOSE
2030 LDX #$10
2040 LDA #$0C
2050 STA $0342,X
2060 JMP $E456
2070 DIR
2080 JSR CLOSE
2090 JSR CLS
2100 LDX #
2110 LDY # >?DIR
2120 STX $0230
2130 STY $0231
2140 LDX # ?DIR
2150 LDY # >??DIR
2160 STX PCRSR
2170 STY PCRSR+1
2180 LDX #$10
2190 LDA #$03
2200 STA $0342,X
2210 LDA #
2220 STA $0344,X
2230 LDA # >ALL
2240 STA $0345,X
2250 LDA #$06
2260 STA $034A,X
2270 LDA #$00
2280 STA $034B,X
2290 JSR $E456
2300 LDA #$07
2310 STA $0342,X
2320 LDA #$00
2330 STA $0348,X
2340 STA $0349,X
2350 STA RY
2360 STA RY+1
2370 LEDIR
2380 JSR $E456
2390 BMI ?EXIT
2400 CMP #155
2410 BEQ EXIT
2420 JSR ASCINT
2430 LDY RY
2440 STA (PCRSR),Y
2450 INC RY
2460 BNE F0
2470 INC PCRSR+1
2480 INC RY+1
2490 F0
2500 LDY RY+1
2510 CPY #$01
2520 BNE F1
2530 LDY RY
2540 CPY #104
2550 BCC F1
2560 JSR PAUSE
2570 INC RY
2580 F1
2590 JMP LEDIR
2600 EXIT
2610 INC RY
2620 INC RY
2630 INC RY
2640 JMP LEDIR
2650 ?EXIT
2660 JSR CLOSE
2670 JSR PAUSE
2680 JSR CLS
2690 PLA
2700 PLA
2710 JMP START
2720 PAUSE
2730 LDA 53279
2740 CMP #$06
2750 BNE PAUSE
2760 JSR CLS
2770 LDA #$00
2780 STA RY
2790 STA RY+1
2800 LDA # ?DIR
2810 STA PCRSR
2820 LDA # >??DIR
2830 STA PCRSR+1
2840 LDX #$10
2850 RTS
2860 FLSH
2870 LDY RY
2880 LDA (PCRSR),Y
2890 EOR #63
2900 STA (PCRSR),Y
2910 LDA #$10
2920 STA $021A
2930 RTS
2940 OPENK
2950 LDA #255
2960 STA 764
2970 LDX #$10
2980 LDA #$03
2990 STA $0342,X
3000 STA $0345,X
3010 LDA #$26
3020 STA $0344,X
3030 LDA #$04
3040 STA $034A,X
3050 JSR $E456
3060 LDA #$07
3070 STA $0342,X
3080 LDA #$00
3090 STA $0348,X
3100 STA $0349,X
3110 STA RY
3120 RTS
3130 RUTLEE
3140 LDX #
3150 LDY # >FLSH
3160 LDA #$10
3170 STX $0228
3180 STY $0229
3190 STA $021A
3200 JSR OPENK
3210 GETEC
3220 JSR $E456
3230 CMP #'~
3240 BNE C0
3250 LDY RY
3260 BEQ GETEC
3270 LDA #$00
3280 STA (PCRSR),Y
3290 LDA #63
3300 DEY
3310 STA (PCRSR),Y
3320 DEC RY
3330 JMP GETEC
3340 C0
3350 CMP #155
3360 BEQ C2
3370 JSR ASCINT
3380 LDY RY
3390 STA (PCRSR),Y
3400 CPY #20
3410 BEQ C1
3420 INC RY
3430 C1
3440 JMP GETEC
3450 C2
3460 JSR CLOSE
3470 LDA #$00
3480 STA $021A
3490 LDY RY
3500 STA (PCRSR),Y
3510 RTS
3520 FGET
3530 LDA #$DF
3540 STA $D301
3550 LDA #$00
3560 STA LEN
3570 STA LEN+1
3580 LOPFGET
3590 LDX #$10
3600 LDA #$07
3610 STA $0342,X
3620 LDA #
3630 STA $0344,X
3640 LDA # >BAFER
3650 STA $0345,X
3660 LDA #
3670 STA $0348,X
3680 LDA # >LENGHT
3690 STA $0349,X
3700 ??FGET
3710 JSR $E456
3720 CLC
3730 LDA LEN
3740 ADC $0348,X
3750 STA LEN
3760 LDA LEN+1
3770 ADC $0349,X
3780 STA LEN+1
3790 CLC
3800 LDA $D301
3810 ADC #$04
3820 STA $D301
3830 LDA $0349,X
3840 CMP # >LENGHT
3850 BEQ LOPFGET
3860 CPY #136
3870 BEQ ?FGET
3880 JSR CLOSE
3890 JSR CLS
3900 LDX #$00
3910 TXS
3920 JMP START
3930 ?FGET
3940 JSR ZFR0
3950 LDA #252
3960 STA FR0
3970 JSR IFP
3980 JSR FMOVE
3990 LDA LEN
4000 STA FR0
4010 LDA LEN+1
4020 STA FR0+1
4030 JSR IFP
4040 JSR PONBYTES
4050 JSR FDIV
4060 JSR PONBLOQUES
4070 JSR FPI
4080 LDA FR0
4090 PHA
4100 DEC FR0
4110 JSR IFP
4120 JSR FMOVE
4130 LDA #252
4140 STA FR0
4150 LDA #$00
4160 STA FR0+1
4170 JSR IFP
4180 JSR FMUL
4190 JSR FPI
4200 SEC
4210 LDA LEN
4220 SBC FR0
4230 STA CONT+1
4240 INC CONT+1
4250 PLA
4260 STA CONT
4270 LDX #$10
4280 RTS
4290 PONBYTES
4300 JSR NBYTES
4310 STY RY
4320 LDY #$04
4330 ?PONBYTES
4340 LDA LBUFF,X
4350 AND #$5F
4360 STA BYTES,Y
4370 DEY
4380 DEX
4390 DEC RY
4400 BPL ?PONBYTES
4410 RTS
4420 PONBLOQUES
4430 JSR NBYTES
4440 STY RY
4450 LDY #$02
4460 ?PONBLOQUES
4470 LDA LBUFF,X
4480 AND #$5F
4490 STA BLOQUES,Y
4500 DEY
4510 DEX
4520 DEC RY
4530 BPL ?PONBLOQUES
4540 LDA BLOQUES+2
4550 CMP #$19
4560 BEQ ??PP0
4570 INC BLOQUES+2
4580 PP0
4590 LDY #$02
4600 MVBLQ
4610 LDA BLOQUES,Y
4620 ORA #$20
4630 STA BBLQS,Y
4640 DEY
4650 BPL MVBLQ
4660 LDX #
4670 LDY # >BBLQS
4680 LDA #$00
4690 STX INBUFF
4700 STY INBUFF+1
4710 STA CIX
4720 JMP AFP
4730 ??PP0
4740 LDA #$10
4750 STA BLOQUES+2
4760 LDA BLOQUES+1
4770 CMP #$19
4780 BEQ ???PP0
4790 INC BLOQUES+1
4800 JMP PP0
4810 ???PP0
4820 LDA #$10
4830 STA BLOQUES+1
4840 INC BLOQUES
4850 JMP PP0
4860 NBYTES
4870 JSR FASC
4880 LDX #$00
4890 LDY #$00
4900 LDA LBUFF
4910 CMP #'0
4920 BNE PL0
4930 INX
4940 PL0
4950 LDA LBUFF,X
4960 CMP #$80
4970 BCS PL1
4980 CMP #'.
4990 BEQ PL2
5000 INX
5010 INY
5020 JMP PL0
5030 PL1
5040 RTS
5050 PL2
5060 DEX
5070 LDA LBUFF,X
5080 ORA #$80
5090 STA LBUFF,X
5100 DEY
5110 RTS
5120 LOAD
5130 .BYTE "UU",162," D L&