MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00001 00001 ;SYSRES/ASM - LS-DOS 6.2 000A 00003 LF EQU 10 000D 00004 CR EQU 13 00005 ; 00006 ;*LIST OFF ;Xref of Lowcore 0000 00007 *GET LDOS60/EQU:2 08F0 00008 @$SYS EQU 08F0H 0000 00009 @@1 DEFL 0000H 0000 00010 @@2 DEFL 0000H 0000 00011 @@3 DEFL 0000H 0000 00012 @@4 DEFL 0000H 0877 00013 @BANK EQU 0877H FFFF 00014 @BLD631 EQU 0FFFFH FFFF 00015 @BLD631C EQU 0FFFFH FFFF 00016 @BLD631D EQU 0FFFFH FFFF 00017 @BLD631E EQU 0FFFFH FFFF 00018 @BLD631F EQU 0FFFFH FFFF 00019 @BLD631G EQU 0FFFFH FFFF 00020 @BLD631H EQU 0FFFFH 1300 00021 @BYTEIO EQU 1300H 0689 00022 @CHNIO EQU 0689H 0553 00023 @CKBRKC EQU 0553H 0545 00024 @CLS EQU 0545H 0623 00025 @CTL EQU 0623H 06E3 00026 @DIV16 EQU 06E3H 0642 00027 @DSP EQU 0642H 052D 00028 @DSPLY EQU 052DH 0000 00029 @FRENCH EQU 0000H 0000 00030 @GERMAN EQU 0000H 0638 00031 @GET EQU 0638H 07BD 00032 @HEX16 EQU 07BDH 07C2 00033 @HEX8 EQU 07C2H 06F8 00034 @HEXD EQU 06F8H 06F6 00035 @HEXDEC EQU 06F6H 0000 00036 @HZ50 EQU 0000H 0000 00037 @INTL EQU 0000H 0630 00038 @JCL EQU 0630H 0635 00039 @KBD EQU 0635H 0628 00040 @KEY EQU 0628H 0585 00041 @KEYIN EQU 0585H 0089 00042 @KITSK EQU 0089H 0503 00043 @LOGER EQU 0503H 0500 00044 @LOGOT EQU 0500H 0000 00045 @MOD2 EQU 0000H FFFF 00046 @MOD4 EQU 0FFFFH 0530 00047 @MSG EQU 0530H 06C9 00048 @MUL16 EQU 06C9H 0084 00049 @OPREG EQU 0084H 0528 00050 @PRINT EQU 0528H 063D 00051 @PRT EQU 063DH 0E29 00052 @PRTIMO EQU 0E29H 0645 00053 @PUT EQU 0645H 0FE9 00054 @RSTNMI EQU 0FE9H 0680 00055 @RSTREG EQU 0680H MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00002 078D 00056 @TIME EQU 078DH FFFF 00057 @USA EQU 0FFFFH 0B99 00058 @VDCTL EQU 0B99H 0D38 00059 @VDCTL3 EQU 0D38H 0935 00060 @VDPRT EQU 0935H 0D42 00061 @_VDCTL EQU 0D42H 0DF1 00062 ADDR_2_ROWCOL EQU 0DF1H 0201 00063 BAR$ EQU 0201H 439D 00064 BOOTST$ EQU 439DH 0200 00065 BUR$ EQU 0200H 0A7B 00066 CASHK$ EQU 0A7BH 006C 00067 CFLAG$ EQU 006CH 0300 00068 CORE$ DEFL 0300H F800 00069 CRTBGN$ EQU 0F800H 0033 00070 DATE$ EQU 0033H 07A8 00071 DATELO$ EQU 07A8H 04C7 00072 DAYTBL$ EQU 04C7H 0031 00073 DCBKL$ EQU 0031H 0470 00074 DCT$ EQU 0470H 006D 00075 DFLAG$ EQU 006DH 0846 00076 DIS_DO_RAM EQU 0846H 0B94 00077 DODATA$ EQU 0B94H 0210 00078 DODCB$ EQU 0210H 0C44 00079 DO_CONTROL EQU 0C44H 0CB8 00080 DO_DSPCHAR EQU 0CB8H 0C8C 00081 DO_INVERT_DIS EQU 0C8CH 0C89 00082 DO_INVERT_ENA EQU 0C89H 0C9B 00083 DO_INVERT_OFF EQU 0C9BH 0000 00084 DO_MASK EQU 0000H 0BCB 00085 DO_RET EQU 0BCBH 0BCC 00086 DO_RET1 EQU 0BCCH 0CCE 00087 DO_SCROLL EQU 0CCEH 0BEA 00088 DO_TABS EQU 0BEAH 04C0 00089 DSKTYP$ EQU 04C0H 04C2 00090 DTPMT$ EQU 04C2H 0FF4 00091 DVREND$ EQU 0FF4H 0206 00092 DVRHI$ EQU 0206H 0817 00093 ENADIS_DO_RAM EQU 0817H 000E 00094 FDDINT$ EQU 000EH 006A 00095 FLGTAB$ EQU 006AH 0DAE 00096 GET_@_ROWCOL EQU 0DAEH 0750 00097 HERTZ$ EQU 0750H 040E 00098 HIGH$ EQU 040EH 0072 00099 IFLAG$ EQU 0072H 0420 00100 INBUF$ EQU 0420H 003E 00101 INTVC$ EQU 003EH 0203 00102 JCLCB$ EQU 0203H 0230 00103 JLDCB$ EQU 0230H 07D6 00104 KCK@ EQU 07D6H 0074 00105 KFLAG$ EQU 0074H 08FC 00106 KIDATA$ EQU 08FCH 0208 00107 KIDCB$ EQU 0208H 0202 00108 LBANK$ EQU 0202H 0401 00109 MAXDAY$ EQU 0401H MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00003 0076 00110 MODOUT$ EQU 0076H 04DC 00111 MONTBL$ EQU 04DCH 0077 00112 NFLAG$ EQU 0077H 0078 00113 OPREG$ EQU 0078H 086E 00114 OPREG_SV_AREA EQU 086EH 0835 00115 OPREG_SV_PTR EQU 0835H 0410 00116 PAKNAM$ EQU 0410H 0382 00117 PAUSE@ EQU 0382H 07AF 00118 PCSAVE$ EQU 07AFH 001B 00119 PDRV$ EQU 001BH 0218 00120 PRDCB$ EQU 0218H 0DCD 00121 PUTA@DE EQU 0DCDH 0DCA 00122 PUT_@ EQU 0DCAH 0DC6 00123 PUT_@_ROWCOL EQU 0DC6H 007B 00124 RFLAG$ EQU 007BH 0DD0 00125 ROWCOL_2_ADDR EQU 0DD0H 04C4 00126 RSTOR$ EQU 04C4H 0238 00127 S1DCB$ EQU 0238H 0CF3 00128 SET_SCROLL EQU 0CF3H 007C 00129 SFLAG$ EQU 007CH 0220 00130 SIDCB$ EQU 0220H 0228 00131 SODCB$ EQU 0228H 0380 00132 STACK$ EQU 0380H 0000 00133 START$ EQU 0000H 002D 00134 TIME$ EQU 002DH 002C 00135 TIMER$ EQU 002CH 002B 00136 TIMSL$ EQU 002BH 0713 00137 TIMTSK$ EQU 0713H 04C3 00138 TMPMT$ EQU 04C3H 07B1 00139 TRACE_INT EQU 07B1H 0A8F 00140 TYPHK$ EQU 0A8FH 0B26 00141 TYPTSK$ EQU 0B26H 007F 00142 VFLAG$ EQU 007FH 0401 00143 ZERO$ EQU 0401H 00144 ;*LIST ON 0000 00145 *GET COPYCOM:3 ;Embed copyright notice 00146 ; COPYCOM - File for Copyright COMment block 00147 ; 0000 00148 *GET BUILDVER/ASM:3 00149 ; 00150 ; Buildver/asm is a bit of a kludge since not all utilities can load 00151 ; equates from LDOS60 and still compile. LOWCORE and everybody else 00152 ; relies on this setting, and it eventually ends up in LDOS60/EQU 00153 ; for programs that can use that. 00154 ; FFFF 00155 @BLD631 EQU -1 ;<631>Build 631 distribution (LEVEL 1B) 00156 ; These switches activate patches made since the 1B release. 00157 ; It is important that all earlier patches be enabled when a higher 00158 ; patch is enabled. 00159 ; Patches C thru F were published in TMQ IV.iv, page 32 (NOTE: the 00160 ; patch addresses listed for SPOOL in SPOOL1/FIX are 19H high.) FFFF 00161 @BLD631C EQU -1 ;<631>Apply 1C patches (SETKI) FFFF 00162 @BLD631D EQU -1 ;<631>Apply 1D patches (DIR) FFFF 00163 @BLD631E EQU -1 ;<631>Apply 1E patches (DIR & MEMDISK/DCT) MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00004 FFFF 00164 @BLD631F EQU -1 ;<631>Apply 1F patches (SPOOL) 00165 ; Patches G and H were published in TMQ V.i, pages 10 and 18/19. FFFF 00166 @BLD631G EQU -1 ;<631>Apply 1G patches (//KEYIN,DIR,DO *) FFFF 00167 @BLD631H EQU -1 ;<631>Apply 1H patches (MEMORY) 00168 ; 00169 ;End of BUILDVER/ASM 00170 IF @BLD631 00172 ELSE 00173 COM '<*(C) 1982,3,4,6 by LSI*>' 00174 ENDIF 00175 ; MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00005 'System low core assignments 00177 ; 00178 ; LDOS 6.2 Low Core RAM storage assignments 00179 ; Copyright (C) 1982 by Logical Systems, Inc. 00180 ; 0000 00181 START$ EQU 0 0000 00182 ORG 0+START$ 00183 ; 00184 ; Page 0 - RST's, data, and buffers 00185 ; 0000 F3 00186 @RST00 DI ;IPL Entry for R/S 4-P 0001 3E01 00187 LD A,00000001B ;Set image in A 0003 D39C 00188 OUT (9CH),A ;toggle in BOOT/ROM 0005 00 00189 DB 0,0,0 ;CP/M emulator SVC 00 00 0008 C9 00190 @RST08 RET 0009 0000 00191 DW 0 000B 0000 00192 SVCRET$ DW 0 ;Return address from SVC 000D 00 00193 LSVC$ DB 0 ;Last SVC executed 000E F3 00194 FDDINT$ DI ;NOP or DI (F3H) for 000F C9 00195 RET ; System (Smooth) 0010 C9 00196 @RST10 RET 0011 0000 00197 DW 0 0013 00198 USTOR$ DS 5 ;User storage area 0018 C9 00199 @RST18 RET 0019 0000 00200 DW 0 001B 01 00201 PDRV$ DB 1 ;Current drive, physical 001C 0000 00202 PHIGH$ DW 0 ;Physical HIGH$ 001E 0030 00203 LOW$ DW 3000H ;Lowest usable memory 0020 C9 00204 @RST20 RET 0021 0000 00205 DW 0 0023 00 00206 LDRV$ DB 0 ;Current drive, logical 0024 0000 00207 JDCB$ DW 0 ;Saved FCB pointer 0026 0000 00208 JRET$ DW 0 ;Saved I/O return address 0028 C35B1A 00209 @RST28 JP RST28 ;System SVC processor 002B 55 00210 TIMSL$ DB 55H ;Fast=55, slow=FF 002C 00 00211 TIMER$ DB 0 ;RTC counter 002D 00 00212 TIME$ DC 3,0 ;SS:MM:HH storage area 00 00 0030 C3A019 00213 @RST30 JP @DEBUG ;DEBUG call address 0033 00214 DATE$ DS 5 ;YY/DD/MM/packed 0038 C3FF1B 00215 @RST38 JP RST38@ ;Interrupt RST 00216 IF @BLD631 003B 01 00217 OSRLS$ DB 01H ;<631>OS Release # 00218 ELSE 00219 OSRLS$ DB 00H ;OS Release # 00220 ENDIF 00221 ; 00222 ; INTIM$ stores the image read from RDINTSTATUS* 00223 ; 003C 00 00224 INTIM$ DB 0 ;Interrupt latch image 00225 ; 00226 ; INTMSK$ masks the image read from RDINTSTATUS* MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00006 'System low core assignments 00227 ; LDOS 6.x permits only RS-232 RCV INT, IOBUS INT, 00228 ; and RTC INT to be used by the TASKER off of RST38 00229 ; 003D 2C 00230 INTMSK$ DB 2CH ;Mask for INTIM$ 00231 ; 00232 ; INTVC$ stores the eight vectors associated 00233 ; with the INTIM$ bit assignments 00234 ; 003E 481C 00235 INTVC$ DW RETINST ;Primary interrupts 0040 481C 00236 DW RETINST,RTCPROC,RETINST 941C 481C 0046 481C 00237 DW RETINST,RETINST,RETINST,RETINST 481C 481C 481C 00238 ; 00239 ; TCB$ stores the TCB vectors for task slots 0-11 00240 ; 004E 00241 TCB$ DS 24 ;Interrupt task vectors 00242 ; 00243 ; NMI vector used in disk I/O 00244 ; 0066 00245 @NMI DS 3 ;Don't overlay this 00246 ; 00247 ; OVRLY$ stores the system's overlay request # 00248 ; 0069 00 00249 OVRLY$ DB 0 ;Current overlay resident 00250 ; 00251 ; FLGTAB$ stores 26 flags and images. A pointer 00252 ; to this table is obtained from SVC-@FLAGS 00253 ; 006A 00254 FLGTAB$ EQU $ 00255 ; 00256 ; 00257 ; AFLAG$ - Start CYL for Allocation search 00258 ; 006A 01 00259 AFLAG$ DB 01 ;AFLAG 006B 00 00260 DB 0 ;BFLAG 00261 ; 00262 ; CFLAG$ assignments: 00263 ; 0 - Cannot change HIGH$ via SVC-100 00264 ; 1 - @CMNDR in execution 00265 ; 2 - @KEYIN request from SYS1 00266 ; 3 - System request for drivers, filters, DCTs 00267 ; 4 - @CMNDR to only execute LIB commands 00268 ; 5 - Sysgen inhibit bit 00269 ; 6 - @ERROR inhibit display 00270 ; 7 - @ERROR to use user (DE) buffer 00271 ; 006C 00 00272 CFLAG$ DB 0 ;Condition flag 00273 ; 00274 ; DFLAG$ assignments: 00275 ; 0 - SPOOL is active 00276 ; 1 - TYPE ahead is active MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00007 'System low core assignments 00277 ; 2 - VERIFY is on 00278 ; 3 - SMOOTH active 00279 ; 4 - MemDISK active 00280 ; 5 - FORMS active 00281 ; 6 - KSM active 00282 ; 7 - accept GRAPHICS in screen print 00283 ; 006D 0A 00284 DFLAG$ DB 00001010B ;DEV Flag (SMOOTH,TYPE) 00285 ; 00286 ; EFLAG$ - Assignments: (sys13 usage) 00287 ; use only bits 4, 5 and 6 to indicate user 00288 ; entry code to be passed to SYS13. SYS13 00289 ; will be executed from SYS1 if this byte 00290 ; is NON/0, bit 4, 5 and 6 will be merged into 00291 ; the SYS13 (1000,1111b) overlay request 00292 ; 006E 00 00293 EFLAG$ DB 0 ;Flag E 006F 00 00294 FEMSK$ DB 0 ;Port FE mask 0070 00 00295 DC 2,0 ;Flags G-H 00 00296 ; 00297 ; IFLAG$ - Assignments: (INTERNATIONAL) 00298 ; 0 - FRENCH 00299 ; 1 - GERMAN 00300 ; 2 - SWISS 00301 ; 3 - 00302 ; 4 - 00303 ; 5 - 00304 ; 6 - Special DMP mode ON/OFF 00305 ; 7 - '7' bit mode ON/OFF 00306 ; 0072 00307 IFLAG$ EQU $ 00308 IF @FRENCH 00309 DB 01000001B 00310 ENDIF 00311 IF @GERMAN 00312 DB 01000010B 00313 ENDIF 00314 IF @USA 0072 00 00315 DB 0 00316 ENDIF 0073 00 00317 DB 0 ;Flag J 00318 ; 00319 ; KFLAG$ assignments: 00320 ; 0 - BREAK latch 00321 ; 1 - PAUSE latch 00322 ; 2 - ENTER latch 00323 ; 3 - reserved 00324 ; 4 - reserved 00325 ; 5 - CAPs lock 00326 ; 6 - reserved 00327 ; 7 - character in TYPE ahead MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00008 'System low core assignments 00328 ; 0074 00 00329 KFLAG$ DB 0 ;Keyboard flag 00330 ; 00331 ; LFLAG$ assignments: 00332 ; 0 - inhibit step rate question in FORMAT 00333 ; 4 - inhibit 8" query in FLOPPY/DCT 00334 ; 5 - inhibit # sides question in FORMAT 00335 ; 6,7 - Reserved for IM 2 hardware 00336 ; 0075 11 00337 LFLAG$ DB 00010001B ;LDOS feature inhibit 00338 ; 00339 ; MODOUT$ mask assignments: 00340 ; 0 - 00341 ; 1 - cassette motor on/off 00342 ; 2 - mode select (0 = 80/64, 1 = 40/32) 00343 ; 3 - enable alternate character set 00344 ; 4 - enable external I/O 00345 ; 5 - video wait states (0 = disable, 1 = enable) 00346 ; 6 - clock speed ( 1 = 4 Mhz, 0 = 2 MHz) 00347 ; 7 - 00348 ; 00349 IF @INTL 00350 MODOUT$ DB 70H ;MODOUT international 00351 ELSE 0076 78 00352 MODOUT$ DB 78H ;MODOUT port image (FAST) 00353 ENDIF 00354 ; 00355 ; 00356 ; NFLAG$ - Network flag$ 00357 ; 0 - Allow setting of file open bit in DIR 00358 ; 1 / 5 - Reserved 00359 ; 6 - Set if in Task Processor 00360 ; 7 - Reserved 00361 ; 0077 00 00362 DB 0 ;Inhibit open bit in DIR 00363 ; 00364 ; OPREG$ memory management image port 00365 ; 0 - SEL0 - Select map overlay bit 0 00366 ; 1 - SEL1 - Select map overlay bit 1 00367 ; 2 - 80/64 - 1 = 80 x 24 00368 ; 3 - Inverse video 00369 ; 4 - MBIT0 - memory map bit 0 00370 ; 5 - MBIT1 - memory map bit 1 00371 ; 6 - FXUPMEM - fix upper memory 00372 ; 7 - PAGE - page 1K video RAM (set for 80x24) 00373 ; 0078 87 00374 OPREG$ DB 87H ;Memory management image 00375 ; 00376 ; PFLAG$ - Printer flag 00377 ; 7 = Printer spooler is paused 00378 ; 0 - 6 = Reserved 00379 ; MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00009 'System low core assignments 0079 00 00380 DB 0 007A 00 00381 DB 0 ;QFLAG$ 00382 ; 00383 ; RFLAG$ - Retry init for FDC driver 00384 ; 007B 08 00385 RFLAG$ DB 08 ;FDC retry count >=2 00386 ; 00387 ; SFLAG$ assignments: 00388 ; 0 - inhibit file open bit 00389 ; 1 - set to 1 if bit-2 set & EXEC file opened 00390 ; 2 - set by @RUN to permit load of EXEC file 00391 ; 3 - SYSTEM (FAST) 00392 ; 4 - BREAK key disabled 00393 ; 5 - JCL active 00394 ; 6 - force extended error messages 00395 ; 7 - DEBUG to be turned on after load 00396 ; 007C 08 00397 SFLAG$ DB 8 ;System flag (FAST) 00398 ; 00399 ; 00400 ; Machine TYPE assignment: 00401 ; All values are in decimal 00402 ; 00403 ; 2 = TRS-80 Model 2 00404 ; 4 = TRS-80 Model 4 00405 ; 5 = TRS-80 MODEL 4P 00406 ; 12 = TRS-80 Model 12 00407 ; 16 = TRS-80 Model 16 00408 ; 00409 IF @MOD4 007D 04 00410 TFLAG$ DB 04 ;Model 4 assignment 00411 ELSE 00412 ERR 'Undefined machine TYPE for TFLAG' 00413 ENDIF 007E 00 00414 DB 0 ;Flag U 00415 ; 00416 ; Video FLAG$ assignments: 00417 ; 0-3 - Set blink rate (1=fastest,7=slowest) 00418 ; 4 - display CLOCK 00419 ; 5 - cursor blink toggle bit 00420 ; 6 - Inhibit blinking cursor (user) 00421 ; 7 - Inhibit blinking cursor (system) 00422 ; 007F 00 00423 VFLAG$ DB 0 ;Blink,Slow,No clock 00424 ; 00425 ; WRINT$ - interrupt mask register 00426 ; 0 - enable 1500 baud rising edge 00427 ; 1 - enable 1500 baud falling edge 00428 ; 2 - enable real time clock 00429 ; 3 - enable I/O bus interrupts 00430 ; 4 - enable RS-232 transmit interrupts 00431 ; 5 - enable RS-232 receive data interrupts MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00010 'System low core assignments 00432 ; 6 - enable RS-232 error interrupt 00433 ; 0080 04 00434 WRINT$ DB 4 ;WRINTMASK port image 0081 00 00435 DB 0 ;Flag x 00436 ; 00437 ; Bits 0-7 indicate new style dating on drives 0-7 00438 ; 0082 FF 00439 YFLAG$ DB 0FFH 0083 00 00440 DB 0 ;Z flag 00441 ; 00442 ; Contents are high-order byte of SVC table 00443 ; 0084 01 00444 DB SVCTAB$<-8 ;MSB of SVC table 00445 ; 00446 ; OSVER$ stores the operating system version 00447 ; 0085 63 00448 OSVER$ DB 63H ;OS version # 00449 ; 00450 ; Vector for config initialization 00451 ; 0086 C9 00452 @ICNFG RET ;Initialization config 0087 0000 00453 DW 0 00454 ; 00455 ; Chain vector for KI task processor 00456 ; 0089 C9 00457 @KITSK RET ;Keyboard task routine 008A 0000 00458 DW 0 00459 ; 00460 ; System File Control Block for overlays 00461 ; 008C 80 00462 SFCB$ DB 80H,0,0 ;System /SYS FCB 00 00 008F 001D 00463 DW SBUFF$ 0091 00 00464 DB 0 0092 0000 00465 DW 0,0,0,-1,0,-1,-1 0000 0000 FFFF 0000 FFFF FFFF 00466 ; 00467 ; 32-byte DEBUG save area 00468 ; 00A0 00469 DBGSV$ DS 32 00470 ; 00471 ; Job Control Language File Control Block 00472 ; 00C0 00 00473 JFCB$ DC 3,0 00 00 00C3 001D 00474 DW SBUFF$ 00C5 00475 DS 27 00476 ; 00477 ; System Command Line file control block 00478 ; 00E0 00479 CFCB$ EQU $ ;Command Interpreter FCB 00E0 43 00480 CFGFCB$ DB 'CONFIG/SYS.CCC:0',3 MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00011 'System low core assignments 4F 4E 46 49 47 2F 53 59 53 2E 43 43 43 3A 30 03 00F1 00481 DS 15 00482 ; 00483 ; Page 1 - System Supervisor Call Table 00484 ; 0100 00485 SVCTAB$ EQU $ 00486 IFNE $,100H 00487 ERR 'SVCTBL location violation' 00488 ENDIF 00489 ; 00490 ; Initial version 00491 ; 2400 00492 MAXCOR$ EQU 2400H+START$ 3000 00493 MINCOR$ EQU 3000H+START$ 1300 00494 ORG @BYTEIO 00495 ; 00496 ; file positioning routines - MUST BE FIRST 00497 ; MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00012 ' UPD 1375 CD9215 00569 NXTSECT CALL CKEOF1 ;Ck for end of file 1378 C0 00570 RET NZ ;Can't extend in update mode 1379 DD7E01 00571 NSEC1 LD A,(IX+1) ;Read access? 137C E607 00572 AND 7 137E FE06 00573 CP 6 1380 3044 00574 JR NC,RWRIT3 ;"Illegal access..." if not 1382 CDCB15 00575 NSEC2 CALL IOREC ;Calc cylinder/sector 1385 C0 00576 RET NZ 1386 DDCB01AE 00577 RES 5,(IX+1) ;Show buffer current 138A DD6E03 00578 LD L,(IX+3) ;P/u buffer address 138D DD6604 00579 LD H,(IX+4) 1390 CDF419 00580 CALL @RDSEC ;Read the sector 1393 2803 00581 JR Z,BUMPNRN ;Go if no error 1395 FE06 00582 CP 6 ;Test for prot sector 1397 C0 00583 RET NZ ;Quit if error not 6 1398 DD340A 00584 BUMPNRN INC (IX+10) ;Inc the NRN ptr LSB 139B 2003 00585 JR NZ,ZEROA@ 139D DD340B 00586 INC (IX+11) ; and MSB if necessary 00587 IF @BLD631 00588 @SEEKSC: ;<631> 00589 ENDIF 13A0 AF 00590 ZEROA@ XOR A 13A1 C9 00591 RET 00592 ; 00593 ; Repositioning needs to write out the buffer 00594 ; 13A2 DD7E01 00595 RWRIT@ LD A,(IX+1) 13A5 E690 00596 AND 90H ;Test for non-sector i/o and 13A7 FE90 00597 CP 90H ; buffer contents changed 13A9 2805 00598 JR Z,RWRIT1 ;Go if conditions true 13AB 18F3 00599 JR ZEROA@ ; else no need to write 13AD CD6815 00600 @RWRIT CALL CKOPEN@ ;Ck file open, save regs 13B0 CD0B14 00601 RWRIT1 CALL GETNRN ;P/u NRN 13B3 7C 00602 LD A,H ;Ignore if rewound 13B4 B5 00603 OR L MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00015 'Upd dir if so 00650 ELSE 00651 JP NZ,WEOF1 ;Upd dir if so 00652 ENDIF 140A C9 00653 RET 00654 ; 140B DD6E0A 00655 GETNRN LD L,(IX+10) ;Xfer NRN to HL MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00016 ' 00668 ;<631> Return formatted date, HL => user buffer 00669 ;<631> 1420 CDA807 00670 @DATE CALL DATELO$ ;<631>Call existing date code in LOWCORE 1423 E5 00671 PUSH HL ;<631> 1424 2B 00672 DEC HL ;<631> 1425 2B 00673 DEC HL ;<631> 1426 7E 00674 LD A,(HL) ;<631> 1427 FE3A 00675 CP ':' ;<631>Test for decade overflow 1429 3803 00676 JR C,DATE1 ;<631> 142B D60A 00677 SUB 0AH ;<631> 142D 77 00678 LD (HL),A ;<631> 142E E1 00679 DATE1 POP HL ;<631> 142F C9 00680 RET ;<631> 00681 ELSE 00682 ; 00683 ; Entry to seek next record of a file 00684 ; 00685 @SEEKSC CALL CKOPEN@ ;Link to FCB & ck if open 00686 CALL CKEOF1 ;Ensure not > EOF 00687 CALL Z,IOREC ;Get track/sector data 00688 RET NZ ;Back on I/O error 00689 CALL @SEEK ;Issue seek to drive 00690 XOR A ;Ignore seek errors here 00691 RET 00692 ENDIF 00693 IF @BLD631 00694 ; 00695 ; Entry to Write an end-of-file mark 00696 ;<631> This routine relocated here to allow more relative branch references. 00697 ; 1430 CD6815 00698 @WEOF CALL CKOPEN@ 1433 CDA213 00699 CALL RWRIT@ ;Write buffer if needed 1436 DD4607 00700 WEOF1 LD B,(IX+7) ;P/u DEC of FPDE 1439 DD4E06 00701 LD C,(IX+6) ;P/u drive # 143C CDBB18 00702 CALL @DIRRD ;Read file's dir record 143F C0 00703 RET NZ ;Back if read error 1440 2C 00704 INC L ;Pt to ERN offset 1441 2C 00705 INC L 1442 2C 00706 INC L 1443 DD7E08 00707 LD A,(IX+8) ;P/u EOF offset MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00017 'EOF 1462 DDCB017E 00728 BIT 7,(IX+1) ;Jump if sector i/o only 1466 281D 00729 JR Z,POSN1 1468 60 00730 LD H,B ;Record ptr to HL 1469 69 00731 LD L,C 146A DDB609 00732 OR (IX+9) ;P/u LRL 146D 2816 00733 JR Z,POSN1 ;Skip nxt if LRL=256 146F CDC906 00734 CALL @MUL16 ;Calc sector & offset 1472 44 00735 LD B,H ;Physical sector =>BC 1473 4D 00736 LD C,L 1474 DD7705 00737 LD (IX+5),A ;Set byte ptr 1477 DDCB016E 00738 BIT 5,(IX+1) ;Jump if buffer does not 147B 200B 00739 JR NZ,POSN2 ; contain current sector 147D CD0B14 00740 CALL GETNRN ;P/u the NRN 1480 37 00741 SCF 1481 ED42 00742 SBC HL,BC 1483 2812 00743 JR Z,$CKEOF ;Pass on to CKEOF 1485 DD7705 00744 POSN1 LD (IX+5),A ;Offset in buffer 1488 C5 00745 POSN2 PUSH BC 1489 CDA213 00746 POSN2A CALL RWRIT@ ;Write current if needed 148C C1 00747 POP BC ; before moving 148D C0 00748 RET NZ ;Back on write error 148E DD710A 00749 LD (IX+10),C ;NRN 1491 DD700B 00750 LD (IX+11),B 1494 CD2A13 00751 CALL SET5 ;Show bfr does not 1497 C39215 00752 $CKEOF JP CKEOF1 ; contain current sector 00753 ; 00754 ; Entry to force a physical read 00755 ; 149A CD6815 00756 @RREAD CALL CKOPEN@ 149D 0E01 00757 LD C,1 ;Cause ADJUST to bump 00758 ; ; NRN when called 149F CD0B14 00759 BKSP1 CALL GETNRN ;Get current record # MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00018 ' @WEOF has been relocated above @SKIP in 6.3.1 00848 ELSE 00849 ; 00850 ; Entry to Write an end-of-file mark 00851 ; 00852 @WEOF CALL CKOPEN@ 00853 CALL RWRIT@ ;Write buffer if needed 00854 WEOF1 LD B,(IX+7) ;P/u DEC of FPDE 00855 LD C,(IX+6) ;P/u drive # 00856 CALL @DIRRD ;Read file's dir record 00857 RET NZ ;Back if read error 00858 INC L ;Pt to ERN offset 00859 INC L 00860 INC L 00861 LD A,(IX+8) ;P/u EOF offset 00862 LD (HL),A ;Put in direc 00863 LD DE,17 ;Pt to EOF in dir MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00020 ' this alloc 16DE 13 01213 INC DE ;Get rid of old 16DF F1 01214 POP AF ; current quantity 16E0 18E4 01215 JR CG02 ;Check next extent 01216 ; 01217 ; The EOF is within this allocation. Recover 01218 ; the allocation data and exit 01219 ; 16E2 E1 01220 CG04 POP HL ;P/u gran count to extent 16E3 EB 01221 EX DE,HL ;Gran count to DE 16E4 7E 01222 LD A,(HL) ;P/u granule data 16E5 2B 01223 DEC HL 16E6 6E 01224 LD L,(HL) ;P/u starting cylinder 16E7 67 01225 LD H,A 16E8 AF 01226 XOR A 16E9 C9 01227 RET MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00027 ' DEC of FPDE, C => logical drive number 01437 ; HL <= points to directory record in SBUFF$ 01438 ; 1803 CD0718 01439 @DIRWR CALL DIRWR ;Permit two attempts 1806 C8 01440 RET Z 1807 D5 01441 DIRWR PUSH DE ;Save the reg 1808 CDCA18 01442 CALL CALCDIR ;Calc dir cyl 180B 2E00 01443 LD L,0 ;Set buffer to start 180D CDEC19 01444 CALL @WRSSC ;Write the sector 1810 CCDC19 01445 CALL Z,@VRSEC ;Verify on no error 1813 D606 01446 SUB 6 1815 D1 01447 POP DE 1816 C8 01448 RET Z ;Back on system sector 1817 FE09 01449 CP 0FH-6 ;WP error? 1819 3E12 01450 LD A,18 ;Set dir write error 181B C0 01451 RET NZ ; if not WP 181C D603 01452 SUB 3 181E C9 01453 RET 01454 ; 01455 ; Find a spare HIT entry 01456 ; 181F F5 01457 @SCNHIT PUSH AF 1820 3E07 01458 LD A,7 ;Get highest # sector 1822 CD2B1A 01459 CALL @DCTBYT ; on a cylinder 1825 D5 01460 PUSH DE ; into register E 1826 57 01461 LD D,A 1827 E61F 01462 AND 1FH 1829 5F 01463 LD E,A 182A 1C 01464 INC E ;& get number of heads 182B AA 01465 XOR D ; into register A 182C 07 01466 RLCA 182D 07 01467 RLCA 182E 07 01468 RLCA 182F 3C 01469 INC A 1830 CD0A19 01470 CALL @MUL8 ;To calc sectors/cylinder 1833 CD3B19 01471 CALL CKDBLBIT ;Double if necessary 1836 D1 01472 POP DE ;Total sectors per cyl 1837 D602 01473 SUB 2 ;Reduce for GAT & HIT 1839 324D18 01474 LD (NHIT7+1),A ;# of directory sectors 183C F1 01475 POP AF ;Get DEC init entry 183D 6F 01476 LD L,A 183E CD4918 01477 CALL NHIT6 ;Ck if HIT slot is spare 1841 C8 01478 RET Z ;Return if it is spare 1842 2E01 01479 LD L,1 ;Start at beginning 1844 2C 01480 NHIT5 INC L 1845 2002 01481 JR NZ,NHIT6 1847 B4 01482 OR H 1848 C9 01483 RET 1849 7D 01484 NHIT6 LD A,L 184A E61F 01485 AND 1FH 184C FE00 01486 NHIT7 CP 0 184E 7D 01487 LD A,L MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00032 ' directory cylinder 189F 1E01 01550 LD E,1 ;E => HIT sector 18A1 21001D 01551 LD HL,SBUFF$ ;HL => HIT buffer area 18A4 F1 01552 POP AF ;Rcvr flag for RD/WR 18A5 2807 01553 JR Z,HITRW1 ;Go if @HITWR 18A7 CDD818 01554 CALL @RDSSC ;Read cyl D, sector E 18AA 3E16 01555 LD A,22 ;Init "HIT read error" 18AC 180A 01556 JR HITRW2 18AE CDEC19 01557 HITRW1 CALL @WRSSC ;Protected sector write 18B1 CCDC19 01558 CALL Z,@VRSEC ;Verify the write 18B4 FE06 01559 CP 6 ;Protected sector? 18B6 3E17 01560 LD A,23 ;"HIT write error" 18B8 D1 01561 HITRW2 POP DE ;Message for other than 18B9 C1 01562 POP BC ; attempt protected sector 18BA C9 01563 RET 01564 ; 01565 ; Routine to read a directory sector 01566 ; B => DEC of FPDE, C => logical drive number 01567 ; HL <= points to directory record in SBUFF$ 01568 ; 18BB D5 01569 @DIRRD PUSH DE 18BC CDCA18 01570 CALL CALCDIR ;Set HL to SBUFF$ 18BF E5 01571 PUSH HL 18C0 2E00 01572 LD L,0 ;Start of bfr 18C2 CDD818 01573 CALL @RDSSC ;Read it 18C5 E1 01574 POP HL 18C6 3E11 01575 LD A,17 ;Init to dir read err 18C8 D1 01576 POP DE 18C9 C9 01577 RET 01578 ; 01579 ; Routine to get directory access data 01580 ; B => DEC 01581 ; DE <= cylinder and sector needed 01582 ; HL <= pointer to directory record in SBUFF$ 01583 ; 18CA CDF718 01584 CALCDIR CALL @DIRCYL ;Get directory cyl in D 18CD 78 01585 LD A,B ;Calculate record start 18CE E6E0 01586 AND 0E0H ; from the DEC 18D0 6F 01587 LD L,A 18D1 261D 01588 LD H,SBUFF$<-8 ;Point to buffer start 18D3 A8 01589 XOR B ;Calculate directory 18D4 C602 01590 ADD A,2 ; sector needed 18D6 5F 01591 LD E,A MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00034 ' 53 2D 44 4F 53 20 30 36 2E 30 33 2E 30 31 01690 ELSE 01691 DB 'LS-DOS 06.03.00' 01692 ENDIF 01693 IF @USA F81C 20 01694 DB ' ' 01695 ENDIF 01696 IF @GERMAN 01697 DB 'D' 01698 ENDIF 01699 IF @FRENCH 01700 DB 'F' 01701 ENDIF 01702 IF @BLD631 F81D 2D 01703 DB '- Copyright 1986/90 ' ;<631> 20 43 6F 70 79 72 69 67 68 74 20 31 39 38 36 2F 39 30 20 F831 4D 01704 DB 'MISOSYS, Inc. ' ;<631> 49 53 4F 53 59 53 2C 20 49 6E 63 2E 20 20 20 20 01705 ELSE 01706 DB '- Copyright 1986 ' 01707 DB 'Logical Systems Inc.' 01708 ENDIF F85E 01709 ORG CRTBGN$+80+14 F85E 20 01710 DB ' All Rights Reserved. ' 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 6C 6C 20 52 69 67 68 74 73 20 52 65 73 65 72 76 65 64 2E 20 F882 20 01711 DB ' ' 20 20 20 20 20 20 20 20 20 20 20 20 20 20 01712 ; DB 'Licensed to Tandy Corporation.' 1948 01713 ORG CORE$ 01714 ; 01715 ; get the system loader 01716 ; MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00037 ' logical drive specification 01930 ; A => relative byte requested from DCT 01931 ; A <= data at position requested 01932 ; 1A2B E5 01933 @DCTBYT PUSH HL ;Save the register pair 1A2C 67 01934 LD H,A ;Xfer relative position 1A2D CD341A 01935 CALL DCTFLD@ ;Get HL pointing to 1A30 6F 01936 LD L,A ; DCT position 1A31 7E 01937 LD A,(HL) ;Get the byte 1A32 E1 01938 POP HL 1A33 C9 01939 RET 01940 ; 01941 ; Entry to get HL pointing to DCT byte Reg C, Reg A 01942 ; C => logical drive number 01943 ; A => relative byte in DCT requested 01944 ; HL <= start of requested DCT for the drive 01945 ; A <= low order pointer to relative byte request 01946 ; MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00043 ' 01961 ; 1A43 FE1A 01962 SVCUSER CP 26 ;Check for @ERROR 1A45 2808 01963 JR Z,ERRSVC ;Skip next if so 1A47 320D00 01964 LD (LSVC$),A ;Store SVC request 1A4A E3 01965 EX (SP),HL ;P/u RET address 1A4B 220B00 01966 LD (SVCRET$),HL ; and save it 1A4E E3 01967 EX (SP),HL ;Restore RET address 1A4F E5 01968 ERRSVC PUSH HL ;Save HL 1A50 07 01969 RLCA ;Multiply by two 1A51 2601 01970 LD H,SVCTAB$<-8 ;Base of table 1A53 6F 01971 LD L,A ;Set up the low order 1A54 7E 01972 LD A,(HL) ;P/u table entry 1A55 2C 01973 INC L 1A56 66 01974 LD H,(HL) 1A57 6F 01975 LD L,A 1A58 E3 01976 EX (SP),HL ;P/u HL & stuff vector 1A59 79 01977 LD A,C ;Xfer for PUT type ops 1A5A C9 01978 RET 01979 ; 01980 ; RST 28 vector - System & user SVCs 01981 ; 1A5B B7 01982 RST28 OR A ;Test if bit 7 set 1A5C F2431A 01983 JP P,SVCUSER ;Jump on user SVC attempt 1A5F E3 01984 EX (SP),HL ;Discard return addr & 1A60 F5 01985 PUSH AF ; save HL, AF 1A61 219F19 01986 LD HL,@DBGHK ;Set up DEBUG linkage 1A64 7E 01987 LD A,(HL) 1A65 32791A 01988 LD (SET@EXEC),A 1A68 36C9 01989 LD (HL),0C9H 1A6A F1 01990 POP AF ;Restore AF, HL 1A6B E1 01991 POP HL 1A6C CD7F1A 01992 HKRES$ CALL CKMOD@ ;Get overlay if needed 1A6F 3E00 01993 LD A,0 ;P/u new overlay # 1A70 01994 OVRLYOLD EQU $-1 1A71 326900 01995 LD (OVRLY$),A ; & update current 1A74 CD0000 01996 TRANSFR CALL 0 ;Traadr of SYSx 1A77 F5 01997 PUSH AF 1A78 3E00 01998 LD A,0 ;Set to C9 if EXEC only MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00044 ', MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00052 ' only 1C62 C5 02366 PUSH BC ;Was 1C63 F3 02367 DI 1C64 CDB819 02368 CALL TAPDRV ;Reselect drive 1C67 C1 02369 POP BC 1C68 18CC 02370 JR TSKEXIT 02371 ; 02372 ; BREAK during tasking - enter DEBUG? - user BREAK? 02373 ; 1C6A 3A7C00 02374 GOTBRK LD A,(SFLAG$) ;Check if BREAK key is 1C6D E610 02375 AND 10H ; disabled to inhibit 1C6F 20C5 02376 JR NZ,TSKEXIT ; DEBUG or BREAK vector MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00053 ' 1E20 00 02524 NOP ;<631> 02525 ELSE 02526 LDIR 02527 ENDIF 02528 ; 02529 ; Initialization routines 02530 ; 1E21 AF 02531 XOR A ;Clear out stack area 1E22 218103 02532 LD HL,STACK$+1 ;Stack start +1 1E25 2D 02533 CLRLOOP DEC L ;Move down a byte 1E26 77 02534 LD (HL),A ;Now loop and fill 1E27 20FC 02535 JR NZ,CLRLOOP ; and fill with 0's 02536 ; 1E29 ED56 02537 IM 1 1E2B 318003 02538 LD SP,STACK$ ;Set the stack area 1E2E AF 02539 XOR A 1E2F 320202 02540 LD (LBANK$),A ;Set logical bank # 1E32 D3E4 02541 OUT (0E4H),A ;Disable INTRQ & DRQ 02542 ; 1E34 213802 02543 LD HL,S1DCB$ 1E37 77 02544 ZERDCB LD (HL),A ;Zero spare dcb area 1E38 2C 02545 INC L MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00058 ' 1EBD FE0C 02639 CP 12 ;OK if 0-11 now 1EBF 380E 02640 JR C,DATIN1 02641 ; 1EC1 211B15 02642 DATIN LD HL,21<8!27 ;Set video row,col 1EC4 115C21 02643 LD DE,DATEPR ;DATE? question 1EC7 013008 02644 LD BC,8<+8!'0' ;Set buf len & char 1ECA CDD620 02645 CALL GETPARM ;Get response 1ECD 30F2 02646 JR NC,DATIN ;Jump on format error 1ECF 1A 02647 DATIN1 LD A,(DE) ;Is year a leap year? 02648 IF @BLD631 MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00060 ' 1ED2 3003 02650 JR NC,1ED7H ;<631> 1ED4 C664 02651 ADD A,64H ;<631> 1ED6 12 02652 LD (DE),A ;<631> 02653 ENDIF 1ED7 4F 02654 LD C,A ;Save year for later 1ED8 D650 02655 SUB 80 ;Reduce for range test 1EDA FE20 02656 CP ' ' 1EDC 30E3 02657 JR NC,DATIN 1EDE E603 02658 AND 3 1EE0 3E1C 02659 LD A,28 ;Init February 1EE2 2006 02660 JR NZ,NOTLEAP 1EE4 213700 02661 LD HL,DATE$+3+1 ;Set leap flag 1EE7 CBFE 02662 SET 7,(HL) 1EE9 3C 02663 INC A ;Feb to 29 days 1EEA 210304 02664 NOTLEAP LD HL,MAXDAY$+2 ;Set Feb max day # 1EED 77 02665 LD (HL),A 02666 ; 02667 IF @INTL 02668 NOP ;Keep same length 02669 ELSE 1EEE 13 02670 INC DE ;Bump to DAY 02671 ENDIF 1EEF 13 02672 INC DE ;Bump to month & get it 1EF0 1A 02673 LD A,(DE) 1EF1 47 02674 LD B,A ;Save month in reg B 1EF2 3D 02675 DEC A ;Range check 1EF3 FE0C 02676 CP 12 1EF5 30CA 02677 JR NC,DATIN ;Go if 0 or >12 1EF7 2B 02678 DEC HL ;Point to Jan entry 1EF8 85 02679 ADD A,L ;Index the month 1EF9 6F 02680 LD L,A 02681 ; 02682 IF @INTL 02683 INC DE ;Point to day 02684 ELSE 1EFA 1B 02685 DEC DE ;Point to day 02686 ENDIF 02687 ; 1EFB 1A 02688 LD A,(DE) ;P/u day entry 1EFC 3D 02689 DEC A ;Reduce for test (0->FF) 1EFD BE 02690 CP (HL) 1EFE 30C1 02691 JR NC,DATIN ;Go if too large (or 0) 02692 ; 02693 ; Range checks OK - move into DATE$ 02694 ; 1F00 213500 02695 LD HL,DATE$+2 1F03 3C 02696 INC A ;Compensate for DEC A 1F04 70 02697 LD (HL),B ;Stuff month 1F05 2D 02698 DEC L 1F06 77 02699 LD (HL),A ;Stuff day 1F07 2D 02700 DEC L MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00061 ' 02745 ELSE 02746 AND 7 ;can be 0-5 02747 ENDIF 1F3F 83 02748 ADD A,E 1F40 5F 02749 LD E,A ;And add it in 1F41 1600 02750 LD D,0 ;Add into HL 1F43 19 02751 ADD HL,DE 1F44 23 02752 INC HL ;To start in right place MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00062 ' 1F9C 85 02797 ADD A,L ;<631> 1F9D 6F 02798 LD L,A ;<631> 1F9E 8C 02799 ADC A,H ;<631> 1F9F 95 02800 SUB L ;<631> 1FA0 67 02801 LD H,A ;<631> 1FA1 115521 02802 LD DE,PARTYR+1 ;<631> 1FA4 CDF606 02803 CALL @HEXDEC ;<631> 1FA7 215421 02804 LD HL,PARTYR ;<631> MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00063 ' 02806 ELSE 02807 SUB 80-'0' ;Offset only and convert to ascii 02808 LD L,'8' ;init to 198x 02809 CP 10+'0' ;In 1980's? 02810 JR C,WAS80 ;Go if so 02811 INC L ;change to 199x 02812 SUB 10 ;Sub off decade 02813 WAS80 LD H,A ;set ones digit 02814 LD (PARTYR+4),HL ;stuff into dsplay string 02815 LD HL,PARTYR 02816 CALL @DSPLY 02817 ENDIF 02818 ; 02819 ; Prompt for time 02820 ; 1FAD 3AC304 02821 TIMIN LD A,(TMPMT$) ;Time to be prompted 1FB0 B7 02822 OR A 1FB1 2037 02823 JR NZ,SELDCT ;Skip if not 1FB3 0603 02824 TIMIN0 LD B,3 1FB5 21FF00 02825 LD HL,CFGFCB$+31 ;Init time string 1FB8 3600 02826 TIMINIT LD (HL),0 ;Init 00:00:00 1FBA 2B 02827 DEC HL 1FBB 10FB 02828 DJNZ TIMINIT 1FBD 3EFF 02829 LD A,-1 ;Make non-zero 1FBF 32EF20 02830 LD (ISTIM),A 1FC2 211B16 02831 LD HL,22<8!27 1FC5 116E21 02832 LD DE,TIMEPR ;Set prompt message 1FC8 013008 02833 LD BC,8<+8!'0' ;Set len & separ char 1FCB CDD620 02834 CALL GETPARM 1FCE 30E3 02835 JR NC,TIMIN0 ;Loop on format error 1FD0 21FF00 02836 LD HL,CFGFCB$+31 1FD3 3E17 02837 LD A,23 1FD5 BE 02838 CP (HL) ;Test hour range 1FD6 38DB 02839 JR C,TIMIN0 1FD8 2B 02840 DEC HL 1FD9 3E3B 02841 LD A,59 1FDB BE 02842 CP (HL) ;Test minute range 1FDC 38D5 02843 JR C,TIMIN0 1FDE 2B 02844 DEC HL 1FDF BE 02845 CP (HL) ;Test the second range 1FE0 38D1 02846 JR C,TIMIN0 1FE2 112D00 02847 LD DE,TIME$ ;Move the time value 1FE5 010300 02848 LD BC,3 ; into the TIME$ field 1FE8 EDB0 02849 LDIR 02850 ; 02851 ; Check on any AUTO command 02852 ; 1FEA 0680 02853 SELDCT LD B,80H 1FEC CD8203 02854 CALL @PAUSE 1FEF 212004 02855 LD HL,INBUF$ 1FF2 7E 02856 LD A,(HL) ;Pt to 1st byte of AUTO MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00064 ' 2013 D1 02873 POP DE ;Stack integrity 2014 2F 02874 CPL 2015 E601 02875 AND 1 ;No AUTO if 2017 2803 02876 JR Z,NOAUT1 2019 7E 02877 AUTO? LD A,(HL) ;Any AUTO command? 201A FE0D 02878 CP CR ;None if equal 201C D1 02879 NOAUT1 POP DE ;Get back SYSGEN flag 201D 7A 02880 LD A,D ; & move into reg A 201E 110B1B 02881 LD DE,@EXIT ;Where to go after boot 2021 010000 02882 LD BC,0 ;Init BC(HL)=0 for @EXIT 2024 280F 02883 JR Z,NOAUT ;Go if no AUTO 2026 E5 02884 PUSH HL ;Save buffer pointer 2027 21AC20 02885 LD HL,CURSET ;Point to cusor setting 202A 34 02886 INC (HL) ;Bump it down a line 202B E1 02887 POP HL ;Recover INBUF$ pointer 202C 117E19 02888 LD DE,@CMNDI ;Lo order of @CMNDI 202F D5 02889 PUSH DE ;Put on stack for RET 2030 44 02890 LD B,H ;Put INBUF$ pointer on 2031 4D 02891 LD C,L ; stack for @CMNDI 2032 112D05 02892 LD DE,@DSPLY ;But do this first 2035 D5 02893 NOAUT PUSH DE ;Put on stack for RET 2036 C5 02894 PUSH BC ;Either INBUF$ or 0 2037 217E20 02895 LD HL,STUB 203A 115043 02896 LD DE,MOD3BUF+80 ;Must move out of way 203D 015800 02897 LD BC,STUBLEN ; amount to move 2040 D5 02898 PUSH DE ;Add ret vector to stack 2041 EDB0 02899 LDIR ;Move stub up 2043 CD7420 02900 CALL GETKB67 2046 117004 02901 LD DE,DCT$ ;Set up to move DCT's 2049 210043 02902 LD HL,MOD3BUF ; from configed area 204C 015000 02903 LD BC,80 ;Count for DCTs (8*10) 204F D9 02904 EXX ;Keep in alternate set 2050 E682 02905 AND 82H ;Load config if zero 2052 C0 02906 RET NZ ;No config > Go back 2053 210015 02907 LD HL,21<8 ;Set to line 21 2056 0603 02908 LD B,3 ;Position cursor MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00065 ' key 2077 4F 02918 LD C,A 2078 CD1708 02919 CALL ENADIS_DO_RAM 207B 79 02920 LD A,C 207C B6 02921 OR (HL) ;Key down OR not SYSGENed 207D C9 02922 RET 02923 ; 02924 ; Final initialization code 02925 ; 207E 217C00 02926 STUB LD HL,SFLAG$ 2081 CBA6 02927 STUB1 RES 4,(HL) ;Test or SET Break bit 02928 ; without changing Z/NZ 2083 200C 02929 JR NZ,NOTSG ;Go if no SYSGEN found 2085 217600 02930 LD HL,MODOUT$ ;P/u ptr to port mask 2088 7E 02931 LD A,(HL) ;P/u mask byte 2089 D3EC 02932 OUT (0ECH),A ;Speed it up 208B D9 02933 EXX ;Set to move DCT's 208C EDB0 02934 LDIR ;Move 'em 208E CD8600 02935 CALL @ICNFG ;Init config 02936 NOTSG 2091 0E07 02937 LD C,7 02938 SETCYL0 2093 CD1E1A 02939 CALL @GTDCT 2096 FDCB035E 02940 BIT 3,(IY+3) ;If hard drive, don't stuff FF 209A 200B 02941 JR NZ,NOFF ; & don't restore 209C FD3605FF 02942 LD (IY+5),0FFH ;Set in case no restore 20A0 3AC404 02943 LD A,(RSTOR$) ;Do we restore the drives? 20A3 B7 02944 OR A 20A4 CCC819 02945 CALL Z,@RSTOR ;Restore drives 1-7 20A7 0D 02946 NOFF DEC C 20A8 20E9 02947 JR NZ,SETCYL0 20AA 210015 02948 LD HL,21<8 ;Set cursor 20AC 02949 CURSET EQU $-1 20AD 0603 02950 LD B,3 20AF CD990B 02951 CALL @VDCTL 02952 ; 02953 ; Detect Model 4 or 4P and adjust TFLAG$ 02954 ; Look at 'MODEL' at 4018H. If so MOD-4P (5) 02955 ; 02956 ; 20B2 114D4F 02957 LD DE,'OM' 20B5 2A1840 02958 LD HL,(4018H) ;P/u 4P rom leftover MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00066 'What was used for Serial # field in 630 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03081 ELSE 03082 SERIAL$ DB 'Serial# A400B00110',3EH,99H,0C9H 03083 ENDIF 219A 00 03084 DC 32,00 ;Space for message, or?? 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00069 ' sound function 03115 ; Bits 0-2 <0-7> = note # (0 highest) 03116 ; Bits 3-7 <0-31> = relative sound duration 03117 ; All regs except A left unchanged 03118 ; Z-flag set on exit 03119 ; Note that interrupts disabled during duration 03120 ; 0392 C5 03121 @SOUND PUSH BC ;Save registers 0393 E5 03122 PUSH HL 0394 78 03123 LD A,B ;P/u sound data 0395 E607 03124 AND 7 ; & strip off duration 0397 07 03125 RLCA ;Adj for 2-byte fields 0398 21D103 03126 LD HL,SNDTAB 039B 4F 03127 LD C,A 039C 78 03128 LD A,B ;Pick up duration data 039D 0600 03129 LD B,0 ;Index into tone table 039F 09 03130 ADD HL,BC ; to get note-on/off 03A0 4E 03131 LD C,(HL) ;P/u note-on/off data 03A1 23 03132 INC HL 03A2 6E 03133 LD L,(HL) ;P/u note duration 03A3 0F 03134 RRCA ;Rotate sound duration 03A4 0F 03135 RRCA ; into bits 0-4 03A5 0F 03136 RRCA 03A6 E61F 03137 AND 1FH ;Strip off sound # 03A8 3C 03138 INC A ;Adjust for offset MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00071 ' FA4E 83 03227 DC 17,083H ;<631> 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 FA5F BF 03228 DB 0BFH ;<631> FA60 03229 DS 61 ;<631> FA9D BF 03230 DB 0BFH,' ',0BFH ;<631> 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 BF FAB0 03231 DS 61 ;<631> FAED BF 03232 DB 0BFH,' W E L C O M E ',0BFH ;<631> 20 20 57 20 45 20 4C 20 43 20 4F 20 4D 20 45 20 20 BF FB00 03233 DS 61 ;<631> FB3D BF 03234 DB 0BFH,' ',0BFH ;<631> 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 BF FB50 03235 DS 61 ;<631> FB8D BF 03236 DB 0BFH,' t o ',0BFH ;<631> 20 20 20 20 20 20 20 74 20 6F 20 20 20 20 20 20 20 BF FBA0 03237 DS 61 ;<631> FBDD BF 03238 DB 0BFH,' ',0BFH ;<631> 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 BF FBF0 03239 DS 61 ;<631> FC2D BF 03240 DB 0BFH,' L S - D O S ',0BFH ;<631> 20 20 20 4C 20 53 20 2D 20 44 20 4F 20 53 20 20 20 BF FC40 03241 DS 61 ;<631> FC7D BF 03242 DB 0BFH,' ',0BFH ;<631> 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 BF FC90 03243 DS 61 ;<631> FCCD 83 03244 DC 19,083H ;<631> 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 03245 ELSE MISOSYS EDAS-4.3 04/11/99 20:43:48 SYSRES - LS-DOS 6.2 Page 00074 ' 0036 00 03267 DB 0 ;<631> 03268 ENDIF 1E00 03269 END OVERLAY 1E00 is the transfer address 00000 Total errors