Estex-DSS/DSS/API/bootDsk.asm
Tolik 1e52904d97 removed #55aa for GenIOCTL
new subfunction GetMoreParams for GenIOCTL
2026-03-28 19:25:50 +10:00

73 lines
1.8 KiB
NASM
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;/////////////////////////////////////////////////////////////////////
; ”ã­ªæ¨ï #09. <20>®¬¥à á¨á⥬­®£® ¤¨áª .
; ‚®§¢à é ¥â ­®¬¥à ¤¨áª , c ª®â®à®£® § £à㦥­  á¨á⥬ .
;
; <20>ਠB = 0 (GET)
; ¢ë室: A - ­®¬¥à á¨á⥬­®£® ¤¨áª  (0=A,1=B,..)
; <20>ਠB = 1 (SET - ¨á¯. boot-§ £àã§ç¨ª á¨á⥬ë, ¯®á«¥ 祣® äã­ªæ¨ï ­¥¤®áâ㯭 )
; ¢å®¤: H - ­®¬¥à ãáâனá⢠, L - ­®¬¥à à §¤¥«  ­  ãáâனá⢥
; ¢ë室:
;/////////////////////////////////////////////////////////////////////
BOOTDSK:
INC B
DEC B
JR Z,.GET
DEC B
.chg: JR Z,.SET ;R13 ¬¥­ï¥âáï ­  JR ,SETBOOT ¯®á«¥ ¯¥à¢®£® 㤠筮£® ¨á¯®«­¥­¨ï SETBOOT
LD A,DSS_Error.sys.INVALID_FUNCTION
SCF
RET
.GET: ;GET BOOT DISK
.NUM+1: LD A,0 ;R09
AND A
RET
; ‘®®¡é¨âì DSS á ª ª®£® ¤¨áª  § £à㦠¥âáï á¨á⥬ .
; ˆá¯. § £àã§ç¨ª á¨áâ¥¬ë ¤«ï ¨­¨æ. ï祩ª¨ "boot_disk".
.SET: LD B,H ;SET BOOT DISK
LD C,0
;[x] 17.12.2023 § £à㧪  á  ªâ¨¢­®£® à §¤¥« ,   ­¥ á ¯¥à¢®£®
LD (.part),HL
;
.loop: PUSH BC
LD A,C
;LD DE,Dss.DRV.GenIOCTL.Enter
LD BC,Dss.DRV.GenIOCTL.GetParams
RST ToDSS.DRV
;[x] 17.12.2023 § £à㧪  á  ªâ¨¢­®£® à §¤¥« ,   ­¥ á ¯¥à¢®£®
LD A,C ; ­®¬¥à ¯ àâ¨æ¨¨ ¢ MBR ¤¨áª 
;
POP BC
JR C,.NoSupport
EX AF,AF' ;PHISICAL DRIVE NUMBER
CP B
JR NZ,.NoSupport
;[x] 17.12.2023 § £à㧪  á  ªâ¨¢­®£® à §¤¥« ,   ­¥ á ¯¥à¢®£®
EX AF,AF' ; ­®¬¥à ¯ àâ¨æ¨¨ ¢ MBR ¤¨áª 
.part+1: LD HL,0
CP L
JR NZ,.NoSupport
;
;R13
LD A,#38 ; opcode for JR C,addr
LD (BOOTDSK.chg),A
;R13
LD A,C
LD (BOOTDSK.NUM),A
AND A
RET
.NoSupport:
INC C
LD A,(LDRIVE)
CP C
JR NZ,.loop
SCF
RET
; <20>®¬¥à ¯®á«¥¤­¥£® ¤¨áª  ¢ á¨á⥬¥
LDRIVE: DB DSS_MAX_DRIVES_AMOUNT
IF COMPILE_UNUSED_CODE
TDRIVE: DB #00
TCLUST: DW #0000
TCOUNT: DW #0000
ENDIF
;