PAGE 1 MYDOS DISK BUILDER 03 .SET 3,0 10 ; SAVE#D:BUILD.M65 20 ; 30 ; .OPT NO LIST 40 ; .OPT NO EJECT 50 .TITLE "MYDOS DISK BUILDER" 60 ; 70 ; Copyright 1984 80 ; Charles Marslett 90 ; Wordmark Systems 0100 ; 0110 ; Permission is granted by the 0120 ; author for any use whatsoever 0130 ; of this code, so long as this 0140 ; notice remains in the source 0150 ; code, and so long as the 0160 ; source code of this routine, 0170 ; however modified or 0180 ; unmodified, is made available 0190 ; for a nominal cost. 0200 ; 0210 ; 0220 ; Some important absolute 0230 ; addresses 0240 ; =02FC 0250 CH = $02FC 0260 ; KEY PRESS SHADOW REGISTER 0270 ; =E456 0280 CIOV = $E456 0290 ; CIO ENTRY VECTOR 0300 ; =02E0 0310 MENUP = $02E0 0320 ; THE RUN ENTRY POINT OF 0330 ; "MDUP.OBJ" 0340 ; =4800 0350 ORIGIN = $4800 0360 ; GOTTA BE BIG ENOUGH TO NOT 0370 ; HIT EITHER COPY OF MYDOS 0380 ; =00FA 0390 ZCTR = $FA =00FC 0400 BPTR = $FC =00FE 0410 ZPTR = $FE 0420 ; GENERAL PURPOSE POINTERS 0430 ; 0440 ; 0450 ; Define the fields of IOCB 0460 ; #10 that I use 0470 ; 0000 0480 *= $0351 0351 0490 *= *+1 0352 0500 ICMD *= *+1 0353 0510 *= *+1 0354 0520 IBUF *= *+4 0358 0530 ILEN *= *+2 035A 0540 IAUX1 *= *+1 035B 0550 IAUX2 *= *+1 0560 ; PAGE 2 MYDOS DISK BUILDER 0570 ; 0580 ; The BUILD program itself 0590 ; loads MDOS.OBJ and MDUP.OBJ 0600 ; into memory above 0610 ; itself, then relocates the 0620 ; code down over the previous 0630 ; version of MYDOS that we are 0640 ; running with and starts it up. 0650 ; This is how we create a new 0660 ; version of MYDOS 0670 ; 035C 0680 *= ORIGIN 0690 ; 4800 0700 START 4800 A2FF 0710 LDX # SIGNON 0730 ; LOG ONTO THE SCREEN 0740 ; 4804 20554A 0750 JSR DMSG 0760 ; 4807 A9C0 0770 LDA #$C0 4809 85FD 0780 STA BPTR+1 0790 ; POINT BPTR AT $C000 0800 ; 480B A000 0810 LDY #0 480D 84FC 0820 STY BPTR 480F A9FF 0830 LDA #$FF 4811 8D474C 0840 STA SAVC 4814 A210 0850 LDX #$10 4816 0860 CLRC 4816 91FC 0870 STA (BPTR),Y 4818 C8 0880 INY 4819 D0FB 0890 BNE CLRC 481B E6FD 0900 INC BPTR+1 481D CA 0910 DEX 481E D0F6 0920 BNE CLRC 0930 ; 4820 A94C 0940 LDA # >BUFFER 4822 85FD 0950 STA BPTR+1 4824 A94E 0960 LDA # MSG01 483A 20554A 1170 JSR DMSG 1180 ; ANNOUNCE WE ARE READING 1190 ; "D:MDOS.OBJ" 1200 ; 483D A020 1210 LDY # DOSFIL 4841 20B348 1230 JSR LOADBF 1240 ; LOAD CONTENTS OF "MDOS.OBJ" 1250 ; 1260 ; 1270 ; COPY NEW DOS AND DUP CODE FROM 1280 ; FILE "MDUP.OBJ" 1290 ; 4844 A25D 1300 LDX # MSG02 4848 20554A 1320 JSR DMSG 1330 ; ANNOUNCE WE ARE READING 1340 ; "D:MDUP.OBJ" 1350 ; 484B A02B 1360 LDY # DUPFIL 484F 20B348 1380 JSR LOADBF 1390 ; LOAD CONTENTS OF "MDUP.OBJ" 1400 ; 1410 ; MOVE BUFFER DOWN TO LOW MEMORY 1420 ; 4852 A296 1430 LDX # MSG03 4856 20554A 1450 JSR DMSG 1460 ; ANNOUNCE WE ARE RELOCATING DOS 1470 ; AND DUP CODE 1480 ; 4859 A907 1490 LDA #$07 485B 85FF 1500 STA ZPTR+1 485D A900 1510 LDA #$00 485F 85FE 1520 STA ZPTR 1530 ; SET DESTINATION POINTER TO 1540 ; $0700 1550 ; 4861 A94C 1560 LDA # >BUFFER 4863 85FD 1570 STA BPTR+1 4865 A94E 1580 LDA # START 487A D0EF 1710 BNE MVLP2 PAGE 4 MYDOS DISK BUILDER 1720 ; COPY 256 BYTES AT A TIME UNTIL 1730 ; WE ARE ABOUT TO OVERWRITE 1740 ; 'BUILD' ITSELF 1750 ; (THIS IS TOO MUCH, I HOPE, 1760 ; BUT IT WORKS) 1770 ; 1780 ; REINITIALIZE THE SYSTEM 1790 ; 1800 ; 487C A2B1 1810 LDX # MSG04 4880 20394A 1830 JSR WFSTR 1840 ; ANNOUNCE STARTUP AND WAIT FOR 1850 ; A KEY 1860 ; 1870 ; 4883 20F24A 1880 JSR DOSINI 1890 ; REINITIALIZE THE NEW MYDOS 1900 ; 1910 ; 4886 A200 1920 LDX #0 4888 A903 1930 LDA #3 488A 8D4203 1940 STA ICMD-16 488D A92C 1950 LDA #$2C 488F 8D4A03 1960 STA IAUX1-16 4892 A936 1970 LDA # EC 4899 8D4503 2000 STA IBUF+1-16 489C 2056E4 2010 JSR CIOV 2020 ; REOPEN THE KEYBOARD/SCREEN 2030 ; "E:" DEVICE 2040 ; 2050 ; 489F A2D4 2060 LDX # MSG05 48A3 20394A 2080 JSR WFSTR 2090 ; ANNOUNCE WE ARE READY TO RUN 2100 ; THE NEW MYDOS 48A6 A000 2110 LDY #$00 48A8 A200 2120 LDX #$00 48AA 2130 PS1 48AA C8 2140 INY 48AB D0FD 2150 BNE PS1 48AD E8 2160 INX 48AE D0FA 2170 BNE PS1 48B0 6C0A00 2180 JMP ($0A) 2190 ; ENTER NEW MYDOS AT ITS' MENU 2200 ; SCREEN, (USE 'H' TO WRITE OUT 2210 ; NEW DOS AFTER FORMATTING A 2220 ; NEW DISK) 2230 ; 2240 ;* 2250 ;* 2260 ;* 2270 ;* 2280 ; CODE MOVING ROUTINES 2290 ; REFERENCED ABOVE PAGE 5 MYDOS DISK BUILDER 2300 ; 2310 ; 2320 ; 2330 ; LOAD CONTENTS OF OBJECT FILE 2340 ; INTO BUFFER 2350 ; 48B3 2360 LOADBF 48B3 8C5403 2370 STY IBUF 48B6 8D5503 2380 STA IBUF+1 48B9 A9FF 2390 LDA #$FF 48BB 8D454C 2400 STA MINAD 48BE 8D464C 2410 STA MINAD+1 2420 ; SET LOW ADDRESS TO $FFFF 2430 ; 48C1 A903 2440 LDA #3 ; OPEN 48C3 8D5203 2450 STA ICMD 48C6 A904 2460 LDA #4 ; FOR READ 48C8 8D5A03 2470 STA IAUX1 48CB A900 2480 LDA #0 48CD 8D434C 2490 STA MAXAD 48D0 8D444C 2500 STA MAXAD+1 48D3 8D5B03 2510 STA IAUX2 2520 ; SET HIGH ADDRESS TO $0000 2530 ; 48D6 A210 2540 LDX #$10 ; IOCB #10 48D8 2056E4 2550 JSR CIOV 2560 ; OPEN D:MDOS.OBJ OR D:MDUP.OBJ 2570 ; 48DB 1016 2580 BPL GOTFIL ; BRANCH GOOD 2590 ; 48DD A2F2 2600 LDX # NOFIL 48E1 20554A 2620 JSR DMSG 2630 ; REPORT IT IF WE CANNOT OPEN 2640 ; THE FILE, 2650 ; 48E4 2660 WAIT 48E4 A9FF 2670 LDA #$FF ; WAIT FOR KEY 48E6 8DFC02 2680 STA CH ; PRESS SO USER 48E9 ADFC02 2690 LDA CH ; CAN READ 48EC C9FF 2700 CMP #$FF ; MESSAGE 48EE F0F4 2710 BEQ WAIT 48F0 6C0A00 2720 JMP ($0A) ; QUIT BY 2730 ; JUMPING THRU DOSVEC TO OLD DOS 2740 ; 2750 ; 48F3 2760 GOTFIL 48F3 A907 2770 LDA #7 ; CHANGE COMMAND 48F5 8D5203 2780 STA ICMD ; TO GET BINARY 2790 ; ; RECORD 48F8 A948 2800 LDA # BUFAD 48FF 8D5503 2830 STA IBUF+1 2840 ; BUFFER ADDRESS TO THAT OF 2850 ; LOCAL BUFFFER 2860 ; 4902 A902 2870 LDA #2 PAGE 6 MYDOS DISK BUILDER 4904 8D5803 2880 STA ILEN 4907 A900 2890 LDA #0 4909 8D5903 2900 STA ILEN+1 2910 ; LENGTH TO GET = 2 BYTES 2920 ; 490C A210 2930 LDX #$10 ; STILL IOCB #10 490E 2056E4 2940 JSR CIOV ; READ HEADER 4911 300A 2950 BMI INVHDR ; BR ON ERROR 4913 AD484C 2960 LDA BUFAD 4916 2D494C 2970 AND BUFAD+1 4919 C9FF 2980 CMP #$FF ; 2 FFs? 491B 100A 2990 BPL RDNXTB ; BR IF YES 3000 ; 491D 3010 INVHDR 491D A20B 3020 LDX # NOHDR ; BINARY 4921 20554A 3040 JSR DMSG ; FILE SO SAY SO 4924 4CE448 3050 JMP WAIT ; AND THEN QUIT 3060 ; 3070 ; 3080 ; 4927 3090 RDNXTB 4927 A948 3100 LDA # BUFAD 492E 8D5503 3130 STA IBUF+1 3140 ; READ THE NEXT WORD PAIR OF 3150 ; BYTES - (START & END ADDR) 3160 ; 4931 A904 3170 LDA #4 4933 8D5803 3180 STA ILEN 4936 A900 3190 LDA #0 4938 8D5903 3200 STA ILEN+1 3210 ; SET LENGTH TO GET = 4 BYTES 3220 ; 493B A210 3230 LDX #$10 ; STILL IOCB #10 493D 2056E4 3240 JSR CIOV ; DO IT 4940 1007 3250 BPL RDDATA ; BR IF GOOD 4942 C088 3260 CPY #$88 ; BAD, EOF? 4944 D072 3270 BNE ABORT ; BR NO EOF 4946 4CEC49 3280 JMP MOVER ; YES, EOF, WE 3290 ; HAVE LOADED IT ALL, RETURN 3300 ; NORMALLY - ALL GOOD 3310 ; 3320 ; 4949 3330 RDDATA 4949 AD4A4C 3340 LDA BUFAD+2 494C AC4B4C 3350 LDY BUFAD+3 494F CC444C 3360 CPY MAXAD+1 4952 900D 3370 BCC NOTMAX 4954 D005 3380 BNE NEWMAX 4956 CD434C 3390 CMP MAXAD 4959 9006 3400 BCC NOTMAX 495B 3410 NEWMAX 495B 8C444C 3420 STY MAXAD+1 495E 8D434C 3430 STA MAXAD 3440 ; IF THIS BLOCK SETS A NEW HIGH 3450 ; ADDRESS LOADED, THEN UPDATE PAGE 7 MYDOS DISK BUILDER 3460 ; THE NEW HIGH WATER MARK 3470 ; 4961 3480 NOTMAX 4961 38 3490 SEC 4962 ED484C 3500 SBC BUFAD 4965 85FA 3510 STA ZCTR 4967 98 3520 TYA 4968 ED494C 3530 SBC BUFAD+1 496B 85FB 3540 STA ZCTR+1 496D E6FA 3550 INC ZCTR 496F D002 3560 BNE LENOK 4971 E6FB 3570 INC ZCTR+1 4973 3580 LENOK 4973 20BE4A 3590 JSR DEBUG1 4976 AC494C 3600 LDY BUFAD+1 4979 AD484C 3610 LDA BUFAD 497C CC464C 3620 CPY MINAD+1 497F 9007 3630 BCC NEWMIN 4981 D00F 3640 BNE NOTMIN 4983 CD454C 3650 CMP MINAD 4986 B00A 3660 BCS NOTMIN 4988 3670 NEWMIN 4988 C003 3680 CPY #$03 498A 9006 3690 BCC NOTMIN 498C 8C464C 3700 STY MINAD+1 498F 8D454C 3710 STA MINAD 3720 ; AND IF IT SETS A NEW LOW 3730 ; ADDRESS LOADED, UPDATE THE 3740 ; THE NEW LOW WATER MARK 3750 ; 4992 3760 NOTMIN 4992 C007 3770 CPY #$07 4994 900C 3780 BCC DONTMV 4996 C0C0 3790 CPY #$C0 4998 B008 3800 BCS DONTMV 3810 ; SKIP THE INDIRECT BUFFER AND 3820 ; MOVE IF THE ADDR <0700 OR 3830 ; >BFFF 3840 ; 499A 694E 3850 ADC # BUFFER-$0700 49A0 A8 3890 TAY 49A1 68 3900 PLA 49A2 3910 DONTMV 49A2 85FC 3920 STA BPTR 49A4 84FD 3930 STY BPTR+1 49A6 20E14A 3940 JSR DEBUG2 49A9 A900 3950 LDA #0 49AB 8D5803 3960 STA ILEN 49AE 8D5903 3970 STA ILEN+1 3980 ; READ ONE BYTE AT A TIME 3990 ; 49B1 4000 GETNB 49B1 A210 4010 LDX #$10 49B3 2056E4 4020 JSR CIOV 49B6 100A 4030 BPL STBYTE ; GOOD? STORE IT PAGE 8 MYDOS DISK BUILDER 4040 ; 49B8 4050 ABORT 49B8 A22A 4060 LDX # ABORTED 49BC 20554A 4080 JSR DMSG ;REAL I/O ERROR 49BF 4CE448 4090 JMP WAIT ; EXIT TO DOS 4100 ; 49C2 4110 STBYTE 49C2 A4FC 4120 LDY BPTR 49C4 D00B 4130 BNE STBY0 49C6 A4FD 4140 LDY BPTR+1 ; TEST FOR 49C8 C0C0 4150 CPY #$C0 ; BUFFER POINTER 49CA D005 4160 BNE STBY0 ; BEING STILL 49CC 8D474C 4170 STA SAVC ; VALID 49CF F004 4180 BEQ STBY3 49D1 4190 STBY0 49D1 A000 4200 LDY #0 ; PUT BYTE JUST 49D3 91FC 4210 STA (BPTR),Y ; READ 49D5 4220 STBY3 49D5 E6FC 4230 INC BPTR ; INCREMENT THE 49D7 D002 4240 BNE STBT1 ; MEMORY 49D9 E6FD 4250 INC BPTR+1 ; POINTER 49DB 4260 STBT1 49DB A5FA 4270 LDA ZCTR 49DD D002 4280 BNE STBT2 49DF C6FB 4290 DEC ZCTR+1 ; DEC BYTE CNTR 49E1 4300 STBT2 49E1 C6FA 4310 DEC ZCTR ; 49E3 A5FA 4320 LDA ZCTR 49E5 05FB 4330 ORA ZCTR+1 ; IF STILL IN- 49E7 D0C8 4340 BNE GETNB ; SIDE THE 4350 ; BLOCK, READ THE NEXT BYTE 4360 ; 49E9 4C2749 4370 JMP RDNXTB ; OUTSIDE - GET 4380 ; THE NEXT BLOCK READ IN 4390 ; 4400 ; 49EC 4410 MOVER 49EC A90C 4420 LDA #12 ; DONE WITH THE 49EE 8D5203 4430 STA ICMD ; LOAD SO CLOSE 49F1 A210 4440 LDX #$10 ; LOAD FILE 49F3 2056E4 4450 JSR CIOV ; GO DO IT 49F6 209F4A 4460 JSR PSTR 49F9 2800 4470 .BYTE "(",0 ; PUT STRING 49FB AD464C 4480 LDA MINAD+1 49FE 207B4A 4490 JSR PHEX ; REPORT THE LOW 4A01 AD454C 4500 LDA MINAD ; WATER ADDRESS 4A04 207B4A 4510 JSR PHEX ; MARKS 4A07 209F4A 4520 JSR PSTR 4A0A 2D00 4530 .BYTE "-",0 ; PUT STRING 4A0C AD444C 4540 LDA MAXAD+1 4A0F 207B4A 4550 JSR PHEX ; REPORT THE 4A12 AD434C 4560 LDA MAXAD ; HIGH WATER 4A15 207B4A 4570 JSR PHEX ; ADDRESS MARKS 4580 ; 4A18 A26F 4590 LDX # LOADED ; LOADED 4A1C 20554A 4610 JSR DMSG ; MESSAGE PAGE 9 MYDOS DISK BUILDER 4A1F 60 4620 RTS 4630 ; AND RETURN TO THE MAIN LINE 4640 ; CODE 4650 ;* 4660 ;* 4670 ;* 4680 ; STABLE LABLES 4690 ; 4700 ; 4710 ; 4A20 4720 DOSFIL 4A20 443A4D44 4730 .BYTE "D:MDOS.OBJ",$9B 4A24 4F532E4F 4A28 424A9B 4740 ; 4750 ; 4A2B 4760 DUPFIL 4A2B 443A4D44 4770 .BYTE "D:MDUP.OBJ",$9B 4A2F 55502E4F 4A33 424A9B 4780 ; 4790 ; CONSOLE KEYBOARD/DISPLAY 4800 ; IN OTHER WORDS - THE E: DEVICE 4810 ; USED IN 'OPEN' IOCB COMMAND 4820 ; 4830 ; 4A36 4840 EC 4A36 453A9B 4841 .BYTE "E:",$9B 4850 ; 4860 ; 4870 ;** SUBROUTINES 4880 ; 4890 ; DISPLAY A MESSAGE AND WAIT 4900 ; FOR A "START" PRESS 4910 ; 4A39 4920 WFSTR 4A39 20554A 4930 JSR DMSG ; DISPLAY A 4940 ; ; MESSAGE 4950 ; 4A3C 4960 WFSTRT 4A3C A907 4970 LDA #7 ; NO KEY PRESSED 4A3E 8D1FD0 4980 STA $D01F ; CONSOL 4A41 AD1FD0 4990 LDA $D01F ; READ CONSOLE 4A44 C906 5000 CMP #6 ; START KEY 4A46 D0F4 5010 BNE WFSTRT ; LOOP UNTIL 5020 ; START IS PRESSED 5030 ; 4A48 5040 WFSTRT1 4A48 A907 5050 LDA #7 ; NO KEY PRESSED 4A4A 8D1FD0 5060 STA $D01F ; CONSOL 4A4D AD1FD0 5070 LDA $D01F ; READ CONSOLE 4A50 C907 5080 CMP #7 ; NO KEY PRESSED 4A52 D0F4 5090 BNE WFSTRT1 ; LOOP UNTIL 5100 ; ; START IS RELEASED 4A54 60 5110 RTS 5120 ; 5130 ; 5140 ; DISPLAYS A MESSAGE TO THE PAGE 10 MYDOS DISK BUILDER 5150 ; OPERATOR 5160 ; 4A55 5170 DMSG 4A55 86FE 5180 STX ZPTR 4A57 84FF 5190 STY ZPTR+1 4A59 A900 5200 LDA #0 4A5B 85FA 5210 STA ZCTR 4A5D 5220 MSGLP 4A5D A4FA 5230 LDY ZCTR 4A5F B1FE 5240 LDA (ZPTR),Y 4A61 F007 5250 BEQ DXIT 4A63 208E4A 5260 JSR BYTOUT 4A66 E6FA 5270 INC ZCTR 4A68 D0F3 5280 BNE MSGLP 4A6A 5290 DXIT 4A6A 60 5300 RTS 5310 ; 5320 ; 4A6B 5330 CODE 4A6B 30313233 5340 .BYTE "0123456789ABCDEF" 4A6F 34353637 4A73 38394142 4A77 43444546 5350 ; 5360 ; 5370 ; DISPLAY A 4 DIGIT HEX NUMBER 5380 ; ON THE SCREEN 5390 ; 4A7B 5400 PHEX 4A7B 48 5410 PHA 4A7C 4A 5420 LSR A ; GET HIGH 4A7D 4A 5430 LSR A ; NIBBLE VALUE 4A7E 4A 5440 LSR A 4A7F 4A 5450 LSR A ; IN X FOR 4A80 AA 5460 TAX ; OFFSET LOAD OF 4A81 BD6B4A 5470 LDA CODE,X ; REGISTER A 4A84 208E4A 5480 JSR BYTOUT ; PUT TO E: 4A87 68 5490 PLA ; RESTORE BYTE 4A88 290F 5500 AND #$0F ; LOW NIBBLE 4A8A AA 5510 TAX ; SAME AS THE 4A8B BD6B4A 5520 LDA CODE,X ; FIRST 5530 ; 4A8E 5540 BYTOUT 4A8E A20B 5550 LDX #11 4A90 8E4203 5560 STX ICMD-$10 4A93 A200 5570 LDX #0 4A95 8E4803 5580 STX ILEN-$10 4A98 8E4903 5590 STX ILEN-$10+1 4A9B 2056E4 5600 JSR CIOV 4A9E 60 5610 RTS 5620 ; 5630 ; PRINTS MESSAGE TO IOCB #0, 5640 ; E:, BY USING STACKED ADDRESS 5650 ; FROM SUBROUTINE CALL AND 5660 ; ALSO RETURNING TO ADDRESS 5670 ; IMMEADIATELY AFTER MESSAGE 5680 ; CODE 5690 ; PAGE 11 MYDOS DISK BUILDER 4A9F 5700 PSTR 4A9F 68 5710 PLA ; GET ADDRESS OF 4AA0 85FE 5720 STA ZPTR ; MESSAGE INTO 4AA2 68 5730 PLA ; ZERO PAGE 4AA3 85FF 5740 STA ZPTR+1 ; LOCATIONS 4AA5 5750 PLOOP 4AA5 E6FE 5760 INC ZPTR ; BUMP POINTER 4AA7 D002 5770 BNE POUT ; FOR NEXT BYTE 4AA9 E6FF 5780 INC ZPTR+1 ; TO PUT AND TO 5790 ; CORRECT FOR SUBROUTINE CALL 5800 ; 4AAB 5810 POUT 4AAB A200 5820 LDX #0 ; IOCB #0 = E: 4AAD A1FE 5830 LDA (ZPTR,X) ; GET BYTE 4AAF F006 5840 BEQ PEXIT ; ZERO = QUIT 4AB1 208E4A 5850 JSR BYTOUT ; PUT IT 4AB4 4CA54A 5860 JMP PLOOP ; GET ANOTHER 5870 ; 4AB7 5880 PEXIT 4AB7 A5FF 5890 LDA ZPTR+1 ; DONE PRINTING 4AB9 48 5900 PHA ; SO PUSH RETURN 4ABA A5FE 5910 LDA ZPTR ; ADDRESS ONTO 4ABC 48 5920 PHA ; STACK AND 4ABD 60 5930 RTS ; RUN CODE JUST 5940 ; AFTER MESSAGE CODE 5950 ; 5960 ; 5970 ; REPORT THE HIGH AND LOW BUFFER 5980 ; LIMITS 5990 ; 4ABE 6000 DEBUG1 4ABE 209F4A 6010 JSR PSTR 4AC1 2800 6020 .BYTE "(",0 4AC3 AD494C 6030 LDA BUFAD+1 4AC6 207B4A 6040 JSR PHEX 4AC9 AD484C 6050 LDA BUFAD 4ACC 207B4A 6060 JSR PHEX 4ACF 209F4A 6070 JSR PSTR 4AD2 2D00 6080 .BYTE "-",0 4AD4 AD4B4C 6090 LDA BUFAD+3 4AD7 207B4A 6100 JSR PHEX 4ADA AD4A4C 6110 LDA BUFAD+2 4ADD 207B4A 6120 JSR PHEX 4AE0 60 6130 RTS 6140 ; 4AE1 6150 DEBUG2 4AE1 209F4A 6160 JSR PSTR 4AE4 29 6170 .BYTE ")" 4AE5 1E1E1E1E 6180 .BYTE $1E,$1E,$1E,$1E,$1E 4AE9 1E 4AEA 1E1E1E1E 6190 .BYTE $1E,$1E,$1E,$1E,$1E 4AEE 1E 4AEF 1E00 6200 .BYTE $1E,0 4AF1 60 6210 RTS 6220 ; 6230 ; ROUTINE TO REINITIALIZE 6240 ; DOS 2.0 6250 ; PAGE 12 MYDOS DISK BUILDER 4AF2 6260 DOSINI 4AF2 AD0407 6270 LDA $0704 4AF5 850C 6280 STA $0C 4AF7 AD0507 6290 LDA $0704+1 4AFA 850D 6300 STA $0C+1 4AFC 6C0C00 6310 JMP ($0C) ;==REINITIALIZE 6320 ; ENTIRE NEW DOS/DUP SYSTEM!!! 6330 ; 6340 ; 6350 ; 6360 ; MESSAGES TO OPERATOR 6370 ; 4AFF 6380 SIGNON 4AFF 7D9B9B9B 6390 .BYTE $7D,$9B,$9B,$9B 4B03 A0A0CDD9 6400 .BYTE +$80," MYDOS3 do" 4B07 C4CFD3B3 4B0B A0E4EF 4B0E F5E2ECE5 6410 .BYTE +$80,"uble densit" 4B12 A0E4E5EE 4B16 F3E9F4 4B19 F9A0C1D4 6420 .BYTE +$80,"y ATARI OS " 4B1D C1D2C9A0 4B21 CFD3A0A0 4B25 9B 6430 .BYTE $9B 4B26 A0A0A0A0 6440 .BYTE +$80," syst" 4B2A A0A0A0F3 4B2E F9F3F4 4B31 E5EDA0E4 6450 .BYTE +$80,"em disk bui" 4B35 E9F3EBA0 4B39 E2F5E9 4B3C ECE4E5F2 6460 .BYTE +$80,"lder " 4B40 A0A0A0A0 4B44 A0A0A0A0 4B48 9B9B00 6470 .BYTE $9B,$9B,0 6480 ; 4B4B 6490 MSG01 4B4B 4C4F4144 6500 .BYTE "LOADING MDOS.OBJ",$9B 4B4F 494E4720 4B53 4D444F53 4B57 2E4F424A 4B5B 9B 4B5C 00 6510 .BYTE 0 6520 ; 4B5D 6530 MSG02 4B5D 4C4F4144 6540 .BYTE "LOADING MDUP.OBJ",$9B 4B61 494E4720 4B65 4D445550 4B69 2E4F424A 4B6D 9B 4B6E 00 6550 .BYTE 0 6560 ; 4B6F 6570 LOADED 4B6F FE1E1E1E 6580 .BYTE $FE,$1E,$1E,$1E,$1E 4B73 1E 4B74 1E1E1E1E 6590 .BYTE $1E,$1E,$1E,$1E,$1E 4B78 1E 4B79 1E1E1E1E 6600 .BYTE $1E,$1E,$1E,$1E,$1E 4B7D 1E PAGE 13 MYDOS DISK BUILDER 4B7E 1E1E1E1E 6610 .BYTE $1E,$1E,$1E,$1E,$1E 4B82 1E 4B83 1E1E1E1E 6620 .BYTE $1E,$1E,$1E,$1E,$1E 4B87 1E 4B88 1E1E1E1E 6630 .BYTE $1E,$1E,$1E,$1E,$1E 4B8C 1E 4B8D 4C4F4144 6640 .BYTE "LOADED",$FE,$9B,0 4B91 4544FE9B 4B95 00 6650 ; 4B96 6660 MSG03 4B96 4D6F7669 6670 .BYTE "Moving DOS/DU" 4B9A 6E672044 4B9E 4F532F44 4BA2 55 4BA3 5020696E 6680 .BYTE "P into place",$9B,0 4BA7 746F2070 4BAB 6C616365 4BAF 9B00 6690 ; 4BB1 6700 MSG04 4BB1 50524553 6710 .BYTE "PRESS " 4BB5 5320 4BB7 D3D4C1D2 6720 .BYTE +$80,"START" 4BBB D4 4BBC 20544F20 6730 .BYTE " TO INITIALIZ" 4BC0 494E4954 4BC4 49414C49 4BC8 5A 4BC9 45204E45 6740 .BYTE "E NEW DOS",$9B,0 4BCD 5720444F 4BD1 539B00 6750 ; 4BD4 6760 MSG05 4BD4 50524553 6770 .BYTE "PRESS " 4BD8 5320 4BDA D3D4C1D2 6780 .BYTE +$80,"START" 4BDE D4 4BDF 20544F20 6790 .BYTE " TO ENTER NEW DOS" 4BE3 454E5445 4BE7 52204E45 4BEB 5720444F 4BEF 53 4BF0 9B00 6800 .BYTE $9B,0 6810 ; 4BF2 6820 NOFIL 4BF2 43616E6E 6830 .BYTE "Cannot open " 4BF6 6F74206F 4BFA 70656E20 4BFE 4F626A65 6840 .BYTE "Object File",$9B,0 4C02 63742046 4C06 696C659B 4C0A 00 6850 ; 4C0B 6860 NOHDR 4C0B 496E7661 6870 .BYTE "Invalid Header in" 4C0F 6C696420 4C13 48656164 PAGE 14 MYDOS DISK BUILDER 4C17 65722069 4C1B 6E 4C1C 204F626A 6880 .BYTE " Object File",$9B,0 4C20 65637420 4C24 46696C65 4C28 9B00 6890 ; 4C2A 6900 ABORTED 4C2A 492F4F20 6910 .BYTE "I/O Error, " 4C2E 4572726F 4C32 722C20 4C35 6C6F6164 6920 .BYTE "load aborted",$9B,0 4C39 2061626F 4C3D 72746564 4C41 9B00 6930 ; 6940 ; 6950 ;** VARIOUS VARIABLES 6960 ; 4C43 6970 MAXAD *= *+2 4C45 6980 MINAD *= *+2 4C47 6990 SAVC *= *+1 4C48 7000 BUFAD *= *+6 4C4E 7010 BUFFER *= *+START-$0700 7020 ; 7030 ; LOAD ATARIDOS RUN ADDRESS 7040 ; 8D4E 7050 *= $02E0 02E0 0048 7060 .WORD START ; run address 7070 ; ASSEMBLY ERRORS: 0 16029 BYTES FREE PAGE 15 MYDOS DISK BUILDER SYMBOLS 49B8 ABORT 6,3270 # 8,4050 4C2A ABORTED 8,4060 8,4070 # 14,6900 =00FC BPTR # 1,400 2,780 2,820 2,870 2,900 2,950 2,970 2,1030 2,1060 3,1570 3,1590 3,1631 3,1670 7,3920 7,3930 8,4120 8,4140 8,4210 8,4230 8,4250 4C48 BUFAD 5,2800 5,2820 6,2960 6,2970 6,3100 6,3120 6,3340 6,3350 7,3500 7,3530 7,3600 7,3610 11,6030 11,6050 11,6090 11,6110 # 14,7000 4C4E BUFFER 2,940 2,960 3,1560 3,1580 7,3850 7,3880 # 14,7010 4A8E BYTOUT 10,5260 10,5480 # 10,5540 11,5850 =02FC CH # 1,250 5,2680 5,2690 =E456 CIOV # 1,280 4,2010 5,2550 6,2940 6,3240 7,4020 8,4450 10,5600 4816 CLRC # 2,860 2,890 2,920 4A6B CODE # 10,5330 10,5470 10,5520 4ABE DEBUG1 7,3590 # 11,6000 4AE1 DEBUG2 7,3940 # 11,6150 4A55 DMSG 2,750 3,1170 3,1320 3,1450 5,2620 6,3040 8,4080 8,4610 9,4930 # 10,5170 49A2 DONTMV 7,3780 7,3800 # 7,3910 4A20 DOSFIL 3,1210 3,1220 # 9,4720 4AF2 DOSINI 4,1880 # 12,6260 4A2B DUPFIL 3,1360 3,1370 # 9,4760 4A6A DXIT 10,5250 # 10,5290 4A36 EC 4,1970 4,1990 # 9,4840 49B1 GETNB # 7,4000 8,4340 48F3 GOTFIL 5,2580 # 5,2760 035A IAUX1 # 1,540 4,1960 5,2470 035B IAUX2 # 1,550 5,2510 0354 IBUF # 1,520 4,1980 4,2000 5,2370 5,2380 5,2810 5,2830 6,3110 6,3130 0352 ICMD # 1,500 4,1940 5,2450 5,2780 8,4430 10,5560 0358 ILEN # 1,530 6,2880 6,2900 6,3180 6,3200 7,3960 7,3970 10,5580 10,5590 491D INVHDR 6,2950 # 6,3010 4973 LENOK 7,3560 # 7,3580 48B3 LOADBF 3,1230 3,1380 # 5,2360 4B6F LOADED 8,4590 8,4600 # 12,6570 4C43 MAXAD 5,2490 5,2500 6,3360 6,3390 6,3420 6,3430 8,4540 8,4560 # 14,6970 =02E0 MENUP # 1,310 4C45 MINAD 5,2400 5,2410 7,3620 7,3650 7,3700 7,3710 8,4480 8,4500 # 14,6980 49EC MOVER 6,3280 # 8,4410 4B4B MSG01 3,1150 3,1160 # 12,6490 4B5D MSG02 3,1300 3,1310 # 12,6530 4B96 MSG03 3,1430 3,1440 # 13,6660 4BB1 MSG04 4,1810 4,1820 # 13,6700 4BD4 MSG05 4,2060 4,2070 # 13,6760 4A5D MSGLP # 10,5220 10,5280 482C MVLP1 # 2,1020 2,1050 2,1080 486B MVLP2 # 3,1630 3,1660 3,1710 495B NEWMAX 6,3380 # 6,3410 PAGE 16 MYDOS DISK BUILDER SYMBOLS 4988 NEWMIN 7,3630 # 7,3670 4BF2 NOFIL 5,2600 5,2610 # 13,6820 4C0B NOHDR 6,3020 6,3030 # 13,6860 4961 NOTMAX 6,3370 6,3400 # 7,3480 4992 NOTMIN 7,3640 7,3660 7,3690 # 7,3760 =4800 ORIGIN # 1,350 2,680 4AB7 PEXIT 11,5840 # 11,5880 4A7B PHEX 8,4490 8,4510 8,4550 8,4570 # 10,5400 11,6040 11,6060 11,6100 11,6120 4AA5 PLOOP # 11,5750 11,5860 4AAB POUT 11,5770 # 11,5810 48AA PS1 # 4,2130 4,2150 4,2170 4A9F PSTR 8,4460 8,4520 # 11,5700 11,6010 11,6070 11,6160 4949 RDDATA 6,3250 # 6,3330 4927 RDNXTB 6,2990 # 6,3090 8,4370 4C47 SAVC 2,840 8,4170 # 14,6990 4AFF SIGNON 2,710 2,720 # 12,6380 4800 START # 2,700 3,1700 14,7010 14,7060 49DB STBT1 8,4240 # 8,4260 49E1 STBT2 8,4280 # 8,4300 49D1 STBY0 8,4130 8,4160 # 8,4190 49D5 STBY3 8,4180 # 8,4220 49C2 STBYTE 7,4030 # 8,4110 48E4 WAIT # 5,2660 5,2710 6,3050 8,4090 4A39 WFSTR 4,1830 4,2080 # 9,4920 4A3C WFSTRT # 9,4960 9,5010 4A48 WFSTRT1 # 9,5040 9,5090 =00FA ZCTR # 1,390 7,3510 7,3540 7,3550 7,3570 8,4270 8,4290 8,4310 8,4320 8,4330 10,5210 10,5230 10,5270 =00FE ZPTR # 1,410 3,1500 3,1520 3,1640 3,1680 3,1690 10,5180 10,5190 10,5240 11,5720 11,5740 11,5760 11,5780 11,5830 11,5890 11,5910