Estex-DSS/DSS/API/bootDsk.asm
Anatoliy Belyanskiy cc6ab20c6c ...
2023-12-30 02:49:31 +10:00

74 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)
; ¢å®¤: B = 0 (01h - ¨á¯. boot-§ £àã§ç¨ª á¨á⥬ë)
; ¢ë室: A - ­®¬¥à á¨á⥬­®£® ¤¨áª  (0=A,1=B,..)
; <20>ਠB = 1 (SET - ¨á¯. boot-§ £àã§ç¨ª á¨á⥬ë, ¯®á«¥ 祣® äã­ªæ¨ï ­¥¤®áâ㯭 )
; ¢å®¤: A - ­®¬¥à ãáâனá⢠, 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,A ;SET BOOT DISK
LD C,0
;[ ] 17.12.2023 § £à㧪  á  ªâ¨¢­®£® à §¤¥« ,   ­¥ á ¯¥à¢®£®
LD (.part),HL
;
.loop: PUSH BC
LD A,C
LD DE,#55AA
LD BC,256*0 + Dss.DRV.GenIOCTL
RST ToDSS.DRV
;[ ] 17.12.2023 § £à㧪  á  ªâ¨¢­®£® à §¤¥« ,   ­¥ á ¯¥à¢®£®
LD A,C ; ­®¬¥à ¯ àâ¨æ¨¨ ¢ MBR ¤¨áª 
;
POP BC
JR C,.NoSupport
EX AF,AF' ;PHISICAL DRIVE NUMBER
CP B
JR NZ,.NoSupport
;[ ] 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
;