* Add gitattributes to handle line endings. * Import the unmodified LTEMM source. From https://www.lo-tech.co.uk/wiki/LTEMM.EXE. * Add DOSBox and TASM for build. * Add build script for LTEMM. * Modity LTEMM driver for XTMax. * Import the unmodified SDPP source. From https://forum.vcfed.org/index.php?threads/sd-card-to-parallel-port-driver-for-msdos-ver-1-1.42008/. * Add Borland C++ 3.1 (Minimal) for build. * Add build script for SDPP. * Modify SDPP driver for XTMax. * Commit pre-built binaries for LTEMM and SDPP. * Reorganize the drivers into a new folder.
101 lines
2.8 KiB
Plaintext
101 lines
2.8 KiB
Plaintext
;*****************************************************************
|
||
;* *
|
||
;* *
|
||
;* EMM/EMS driver program for BOCARAM30 Memory board *
|
||
;* *
|
||
;* *
|
||
;*****************************************************************
|
||
; Some useful macros ...
|
||
;Ž¡¬¥ ¡ ©â ¬¨ ¬¥¦¤ã SOURCE ¨ DESTINATION
|
||
Exbyte MACRO
|
||
mov al,[si]
|
||
xchg al,es:[di]
|
||
mov [si],al
|
||
inc si
|
||
inc di
|
||
ENDM
|
||
|
||
;Ž¡¬¥ á«®¢ ¬¨ ¬¥¦¤ã SOURCE ¨ DESTINATION
|
||
Exword MACRO
|
||
mov ax,[si]
|
||
xchg ax,es:[di]
|
||
mov [si],ax
|
||
add di,2
|
||
add si,2
|
||
ENDM
|
||
|
||
;‚ëç¨á«¥¨¥ ¡á®«î⮣® ¤à¥á FAR-㪠§ ⥫ï
|
||
;‚室 : 㪠§ â¥«ì ¢ ä®à¬ ⥠ᥣ¬¥â:ᬥ饨¥
|
||
;‚ë室 : DX:AX = ¡á®«îâë© ¤à¥á
|
||
FarPtrAddress MACRO Segment,Offset
|
||
mov dx,Segment
|
||
mov ax,Offset
|
||
mov bx,dx
|
||
mov cl,4
|
||
shl bx,cl
|
||
and dx,0F000h
|
||
rol dx,cl
|
||
add ax,bx
|
||
adc dx,0
|
||
ENDM
|
||
|
||
;‚ëç¨á«¥¨¥ ¡á®«î⮣® ¤à¥á FAR-㪠§ ⥫ï
|
||
;‚室 : 㪠§ ⥫ì ᥣ¬¥â:ᬥ饨¥ (DX:AX)
|
||
;‚ë室 : DX:AX = ¡á®«îâë© ¤à¥á
|
||
FarAddress MACRO
|
||
mov bx,dx
|
||
mov cl,4
|
||
shl bx,cl
|
||
and dx,0F000h
|
||
rol dx,cl
|
||
add ax,bx
|
||
adc dx,0
|
||
ENDM
|
||
|
||
;‘¤¢¨£ ¢«¥¢® 32-à §à冷£® ç¨á« (DX:AX) COUNT à §
|
||
Shl32 MACRO Count
|
||
REPT Count
|
||
shl ax,1
|
||
rcl dx,1
|
||
ENDM
|
||
ENDM
|
||
|
||
;‘¤¢¨£ ¢¯à ¢® 32-à §à冷£® ç¨á« (DX:AX) COUNT à §
|
||
Shr32 MACRO Count
|
||
REPT Count
|
||
shr dx,1
|
||
rcr ax,1
|
||
ENDM
|
||
ENDM
|
||
|
||
;‘«®¦¥¨¥ 32-à §àï¤ëå ç¨á¥« (DX:AX) + HIGH-LOW
|
||
Add32 MACRO High,Low
|
||
add ax,Low
|
||
adc dx,High
|
||
ENDM
|
||
|
||
;‚ëç¨â ¨¥ 32-à §àï¤ëå ç¨á¥« (DX:AX) - HIGH-LOW
|
||
Sub32 MACRO High,Low
|
||
sub ax,Low
|
||
sbb dx,High
|
||
ENDM
|
||
|
||
;‡ £à㧪 32-à §à冷£® ç¨á« ¢ (DX:AX)
|
||
Load32 MACRO High,Low
|
||
mov dx,High
|
||
mov ax,Low
|
||
ENDM
|
||
|
||
;‡ £à㧪 32-à §à冷£® ç¨á« ¢ (DX:AX)
|
||
FLoad32 MACRO Strt
|
||
les ax,dword ptr Strt
|
||
mov dx,es
|
||
ENDM
|
||
|
||
;‘®åà ¥¨¥ 32-à §à冷£® ç¨á« (DX:AX) ¢ HIGH-LOW
|
||
Save32 MACRO High,Low
|
||
mov High,dx
|
||
mov Low,ax
|
||
ENDM
|
||
|