mirror of
https://github.com/SEPPDROID/DR-DOS-OpenDOS.git
synced 2025-10-23 00:14:28 +00:00
Upload
This commit is contained in:
573
IBMBIO/BDOSLDR.A86
Normal file
573
IBMBIO/BDOSLDR.A86
Normal file
@@ -0,0 +1,573 @@
|
||||
; File : $BDOSLDR.A86$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
include i:reqhdr.equ
|
||||
include i:driver.equ
|
||||
include config.equ
|
||||
|
||||
; MISC constants
|
||||
CR equ 0dh ;the usual
|
||||
LF equ 0ah
|
||||
|
||||
|
||||
DATTS equ byte ptr 11
|
||||
DA_VOLUME equ 08h
|
||||
DA_DIR equ 10h
|
||||
DBLOCK1 equ word ptr 26
|
||||
|
||||
|
||||
eject
|
||||
CGROUP group INITCODE, INITDATA
|
||||
|
||||
INITCODE cseg 'INITCODE'
|
||||
|
||||
eject
|
||||
if DOS5
|
||||
VER_MUSTBE equ 1072h
|
||||
else
|
||||
VER_MUSTBE equ 1071h
|
||||
endif
|
||||
|
||||
Public dos_version_check
|
||||
|
||||
Public read_dos ; read BDOS from disk
|
||||
|
||||
;--------
|
||||
read_dos: ; read in the BDOS
|
||||
;--------
|
||||
call login_drive ; build BPB for the boot drive
|
||||
mov si,offset dos_name ; get name of file to open
|
||||
call open_file ; open the BDOS file
|
||||
call read_file ; read in the system file
|
||||
ret
|
||||
|
||||
login_drive:
|
||||
;-----------
|
||||
les di,boot_device ; get device driver address
|
||||
mov dl,boot_drv ; get the boot drive sub unit
|
||||
mov ax,es
|
||||
or ax,di ; make sure boot device is initialised
|
||||
jnz login_drive10
|
||||
jmp dev_fail
|
||||
login_drive10:
|
||||
mov ax,es:6[di] ; get strategy offset
|
||||
mov strat_off,ax
|
||||
mov strat_seg,es ; get strategy segment
|
||||
mov ax,es:8[di] ; get interrupt offset
|
||||
mov intrpt_off,ax
|
||||
mov intrpt_seg,es ; get interrupt segment
|
||||
|
||||
mov bx,offset req_hdr
|
||||
mov ds:RH_UNIT,dl ; save logical unit to use
|
||||
mov ds:RH_CMD,CMD_BUILD_BPB
|
||||
call device_request ; tell it to build a BPB
|
||||
jc dev_fail ; return if can't determine BPB
|
||||
push ds ! push si
|
||||
push ds ! pop es
|
||||
mov di,offset local_bpb ; ES:DI -> local BPB copy
|
||||
mov cx,BPB_LENGTH
|
||||
lds si,ds:RH2_BPB ; copy BPB to local memory
|
||||
rep movsb
|
||||
pop si ! pop ds
|
||||
|
||||
; Now we have to figure out whether the media uses 12 or 16 bit FATs.
|
||||
; To that end, we need to compute the # of clusters on the drive:
|
||||
|
||||
mov fat16,0 ; assume 12 bit FAT
|
||||
|
||||
mov al,BT_nfats ; compute FAT size
|
||||
mov ah,0 ; AX = # of FAT copies (usually 2)
|
||||
mul BT_fat_size ; AX/DX = size of FAT in sectors
|
||||
|
||||
add ax,BT_reserved_sectors ; add in bootstrap sectors
|
||||
adc dx,0
|
||||
mov cx,ax ; CX/BP = sector address of root dir
|
||||
mov bp,dx
|
||||
|
||||
mov ax,32 ; compute root directory size
|
||||
mul BT_dirsize ; AX/DX = bytes in directory
|
||||
mov bx,BT_bytes_per_sector
|
||||
dec bx ; BX = sector size - 1 for rounding
|
||||
add ax,bx ; round up to next sector size
|
||||
adc dx,0
|
||||
inc bx ; BX = sector size in bytes
|
||||
div bx ; AX = # of root directory sectors
|
||||
add cx,ax ; CX/BP = sectors before data area
|
||||
adc bp,0
|
||||
|
||||
mov ax,BT_total_sectors ; AX/DX = total disk size in sectors
|
||||
sub dx,dx
|
||||
test ax,ax ; is it actually larger than 65535?
|
||||
jnz dev_small ; no, AX/DX is correct
|
||||
mov ax,BT_total_long ; else get real size from extension
|
||||
mov dx,BT_total_long+2
|
||||
dev_small: ; AX/DX = disk size in sectors
|
||||
sub ax,cx ; AX/DX = data sectors
|
||||
sbb dx,bp
|
||||
; now convert this to clusters
|
||||
mov bl,BT_sctr_per_cluster
|
||||
mov bh,0 ; BX = sectors per clusters
|
||||
div bx ; AX = # of data clusters
|
||||
inc ax
|
||||
inc ax ; cluster 0,1 are reserved
|
||||
cmp ax,0FF6h ; is this too large for 12 bits?
|
||||
jbe dev_12bit ; skip if 12 bits will do
|
||||
mov fat16,-1 ; else we use 16 bits
|
||||
dev_12bit:
|
||||
ret
|
||||
|
||||
|
||||
dos_version_check:
|
||||
;-----------------
|
||||
mov ax,4452h
|
||||
int 21h ; try and get DRDOS version number
|
||||
jc dev_fail ; it's not DRDOS !
|
||||
cmp ax,VER_MUSTBE ; version check the DRDOS BDOS
|
||||
jne dev_fail ; reject all but the one we want
|
||||
ret ; return now I'm happy
|
||||
|
||||
dev_fail: ; any error has occurred loading the BDOS
|
||||
;--------
|
||||
; Print '$' terminated message at offset DX to console without using the BDOS
|
||||
;
|
||||
mov dx,offset dos_msg
|
||||
les di,resdev_chain ; get first device driver address
|
||||
fail_scan:
|
||||
test es:DH_ATTRIB[di],DA_CHARDEV
|
||||
jz fail_next ; skip if not a character device
|
||||
test es:DH_ATTRIB[di],DA_ISCOT
|
||||
jnz fail_found ; skip if console device found
|
||||
fail_next:
|
||||
les di,es:[di] ; get next device
|
||||
jmps fail_scan
|
||||
fail_found:
|
||||
mov ax,es:6[di] ; get strategy offset
|
||||
mov strat_off,ax
|
||||
mov strat_seg,es ; get strategy segment
|
||||
mov ax,es:8[di] ; get interrupt offset
|
||||
mov intrpt_off,ax
|
||||
mov intrpt_seg,es ; get interrupt segment
|
||||
|
||||
mov bx,offset req_hdr
|
||||
mov ds:RH_CMD,CMD_OUTPUT ; write to console
|
||||
mov ds:RH_LEN,RH4_LEN ; set request header length
|
||||
mov ds:RH4_BUFOFF,dx ; set address of string
|
||||
mov ds:RH4_BUFSEG,ds
|
||||
mov ds:RH4_COUNT,-1
|
||||
mov si,dx ; now find the end of the string
|
||||
fail_count_chars:
|
||||
inc ds:RH4_COUNT ; print another char
|
||||
lodsb ; examine the next one
|
||||
cmp al,'$' ; terminating char ?
|
||||
jnz fail_count_chars
|
||||
call device_request ; call the console driver
|
||||
|
||||
sti
|
||||
jmps $ ; wait for reboot
|
||||
|
||||
|
||||
device_request: ; general device driver interface
|
||||
;--------------
|
||||
; entry: BX -> request header
|
||||
; exit: CY = 1 if error
|
||||
|
||||
push ds ! push es
|
||||
push ds ! pop es
|
||||
mov ds,strat_seg
|
||||
callf cs:strat_ptr
|
||||
callf cs:intrpt_ptr
|
||||
pop es ! pop ds
|
||||
test ds:RH_STATUS,RHS_ERROR
|
||||
jnz devreq_err
|
||||
clc
|
||||
ret
|
||||
devreq_err:
|
||||
jmp dev_fail ; print error message
|
||||
|
||||
|
||||
ret
|
||||
|
||||
open_file: ; open BDOS system file
|
||||
;---------
|
||||
; entry: SI -> 11 byte file name
|
||||
|
||||
mov al,BT_nfats
|
||||
cbw
|
||||
mul BT_fat_size ; DX:AX = # FAT sectors
|
||||
|
||||
mov cx,ax ; CX = rel_sctr dir start
|
||||
mov dx,BT_dirsize ; dx = # entries to scan
|
||||
|
||||
open_f1: ; CX = current dir sector
|
||||
; DX = current dir count
|
||||
; SI -> file name
|
||||
push cx ! push dx ! push si
|
||||
push ds ! pop es ; ES:BX -> sector buffer
|
||||
mov bx,offset sector_buffer
|
||||
mov dx,1 ; read one directory sector
|
||||
call rd_sector_rel ; via disk driver
|
||||
pop si ! pop dx ! pop cx
|
||||
inc cx ; increment sector for next time
|
||||
|
||||
sub bx,bx ; start at beginning of sector
|
||||
open_f2:
|
||||
lea di,sector_buffer[bx] ; ES:DI -> directory entry
|
||||
push si ! push di ! push cx ; save name ptr and count
|
||||
push ds ! pop es
|
||||
mov cx,11
|
||||
repe cmpsb ; check if name matches
|
||||
pop cx ! pop di ! pop si
|
||||
jne open_f3 ; skip if name doesn't match
|
||||
test DATTS[di],DA_DIR+DA_VOLUME
|
||||
jz open_foundit ; skip if matches
|
||||
open_f3:
|
||||
dec dx ; count down root directory entries
|
||||
jz open_fail ; skip if root directory done
|
||||
add bx,32 ; next entry in directory sector
|
||||
cmp bx,BT_bytes_per_sector ; sector complete?
|
||||
jb open_f2 ; loop back while more
|
||||
jmps open_f1 ; read next directory sector
|
||||
|
||||
open_fail: ; file not found
|
||||
jmp dev_fail
|
||||
|
||||
open_foundit: ; found the open file handle
|
||||
mov ax,DBLOCK1[di] ; get first disk block
|
||||
mov start_cluster,ax ; save starting cluster
|
||||
xor ax,ax
|
||||
ret ; return success
|
||||
|
||||
|
||||
read_file: ; read BDOS files into memory at MEM_CURRENT:0000
|
||||
;---------
|
||||
mov ax,current_dos ; Get the Segment address to
|
||||
mov dta_seg,ax ; load the BDOS at
|
||||
sub ax,ax
|
||||
mov dta_off,ax
|
||||
rd_file1:
|
||||
mov cluster_count,1 ; we can read at least one cluster
|
||||
mov cx,start_cluster
|
||||
rd_file2: ; check if next cluster contiguous
|
||||
push cx ; save current cluster number
|
||||
call next_cluster ; get link to next cluster
|
||||
pop dx ; get previous cluster #
|
||||
inc dx ; is current cluster contiguous?
|
||||
cmp cx,dx ; contiguos if CX == DX
|
||||
jne rd_file3 ; no, need a separate read
|
||||
inc cluster_count ; else read one more cluster
|
||||
jmps rd_file2 ; try again with next cluster
|
||||
rd_file3: ; CX = next chain, multi cluster read
|
||||
push cx ; save start of next chain
|
||||
les bx,dta_ptr ; ES:BX -> transfer address
|
||||
mov cx,start_cluster ; previous contiguous chain starts here
|
||||
mov dx,cluster_count ; length of chain in clusters
|
||||
call rd_cluster ; read DX clusters
|
||||
mov al,BT_sctr_per_cluster
|
||||
mov ah,0 ; AX = sectors per cluster
|
||||
mul cluster_count ; AX = sectors in chain to read
|
||||
mul BT_bytes_per_sector ; AX = bytes in chain to read
|
||||
add dta_off,ax
|
||||
pop cx ; CX = next (noncontiguous) cluster
|
||||
mov start_cluster,cx ; start of new chain
|
||||
inc cx ; was it end of file cluster number?
|
||||
jnz rd_file1 ; go back for more if not
|
||||
; else all clusters done
|
||||
ret
|
||||
|
||||
|
||||
get_FAT_byte:
|
||||
;------------
|
||||
; entry: BX = offset into FAT
|
||||
|
||||
mov ax,bx ; BX = offset into FAT
|
||||
sub dx,dx ; AX/DX = 32 bit offset
|
||||
div BT_bytes_per_sector ; AX = sector, DX = offset in sector
|
||||
push dx ; save offset in sector
|
||||
call locate_FAT ; read FAT sector AX
|
||||
pop bx ; BX = offset in FAT sector
|
||||
mov al,sector_buffer[bx] ; get byte from FAT buffer
|
||||
ret
|
||||
|
||||
|
||||
locate_FAT:
|
||||
;----------
|
||||
; entry: AX = FAT sector to locate
|
||||
|
||||
cmp ax,current_fatsec ; AX = sector offset into FAT
|
||||
je locate_FAT_match ; O.K. if same as last time
|
||||
|
||||
mov current_fatsec,ax ; set new sector for next time
|
||||
push cx ! push si ; preserve FAT index
|
||||
mov cx,ax ; CX = sector number
|
||||
mov bx,offset sector_buffer
|
||||
push ds ! pop es ; ES:BX -> sector buffer
|
||||
mov dx,1 ; DX = single sector
|
||||
call rd_sector_rel ; read FAT sector
|
||||
pop si ! pop cx ; restore FAT index
|
||||
|
||||
locate_FAT_match: ; return with right sector in buffer
|
||||
ret
|
||||
|
||||
|
||||
eject
|
||||
; reads sectors relative to start of DOS area on disk (start=0)
|
||||
; same parameters as rd_sector
|
||||
rd_sector_rel:
|
||||
;-------------
|
||||
; entry: CX = sector address relative to first FAT sector
|
||||
; DX = sector count
|
||||
|
||||
sub bp,bp ;overflow word = 0
|
||||
add cx,BT_reserved_sectors
|
||||
adc bp,0
|
||||
; jmps rd_sector
|
||||
|
||||
|
||||
; reads absolute sectors from hard disk using rom bios
|
||||
rd_sector:
|
||||
;---------
|
||||
; entry: DX = number of sectors
|
||||
; ES:BX -> data transfer buffer
|
||||
; DS -> program global data segment
|
||||
; CX/BP = absolute sector # (32 bit) (low/high)
|
||||
|
||||
push cx ! push dx ; save parameters
|
||||
mov req3_bufoff,bx ; save transfer offset
|
||||
mov req3_bufseg,es ; save transfer segment
|
||||
mov req3_count,dx ; set sector count
|
||||
mov bx,offset req_hdr ; BX -> request header
|
||||
mov ds:RH_CMD,CMD_INPUT ; read from disk device
|
||||
mov req3_sector,cx ; set requested sector address
|
||||
if DOS5
|
||||
mov req_hdr,RH4_LEN
|
||||
mov req3_sector32,cx ; with 32 sector number
|
||||
mov req3_sector32+2,bp
|
||||
test bp,bp ; large sector number?
|
||||
jz rd_sec1 ; no, normal request header
|
||||
mov req3_sector,0FFFFh ; mark as a large request
|
||||
rd_sec1:
|
||||
else
|
||||
mov req3_sector+2,bp ; (support large DOS drives)
|
||||
mov req_hdr,24 ; indicate large request
|
||||
endif
|
||||
call device_request ; tell it to read sectors
|
||||
pop cx ! pop dx
|
||||
ret ; if CY, AH=error code
|
||||
|
||||
|
||||
rd_cluster:
|
||||
;----------
|
||||
; entry: CX = DOS cluster number.
|
||||
; DX = cluster count
|
||||
; ES:BX -> transfer buffer
|
||||
|
||||
push bx ! push es
|
||||
|
||||
mov al,BT_sctr_per_cluster
|
||||
mov ah,0 ; AX = sectors per cluster
|
||||
mul dx ; AX = sectors in all clusters
|
||||
push ax ; save the sector count
|
||||
|
||||
sub cx,2 ; cluster 2 is data area start
|
||||
mov al,BT_sctr_per_cluster
|
||||
cbw
|
||||
mul cx ; AX,DX = relative sector #
|
||||
mov cx,ax
|
||||
mov bp,dx ; CX,BP = data area sector #
|
||||
|
||||
mov al,BT_nfats ; compute FAT size
|
||||
mov ah,0 ; AX = # of FAT copies (usually 2)
|
||||
mul BT_fat_size ; AX/DX = size of FAT in sectors
|
||||
add cx,ax
|
||||
adc bp,dx ; CX,BP = end of FAT sectors
|
||||
|
||||
mov ax,32
|
||||
mul BT_dirsize ; AX,DX = bytes in root directory
|
||||
mov bx,BT_bytes_per_sector
|
||||
dec bx
|
||||
add ax,bx ; round up directory size
|
||||
adc dx,0
|
||||
inc bx
|
||||
div bx ; AX = root directory sectors
|
||||
add cx,ax
|
||||
adc bp,0 ; add root directory size
|
||||
|
||||
add cx,BT_reserved_sectors ; add in boot sector(s)
|
||||
adc bp,0
|
||||
|
||||
pop dx ! pop es ! pop bx ; sector count, disk address
|
||||
|
||||
jmp rd_sector ; DX secs from CX/BP to ES:BX
|
||||
|
||||
|
||||
; Finds the NEXT cluster after the one passed in CX in an allocation
|
||||
; chain by using the FAT. Returns the carry set if the end of chain
|
||||
; mark is found, otherwise returns the NEW cluster # in CX.
|
||||
next_cluster:
|
||||
;------------
|
||||
push dx ! push bx ; save some registers
|
||||
cmp fat16,0 ; check if this is 12 bit media
|
||||
je next_cluster12 ; skip if old fashioned 12 bit
|
||||
mov ax,2
|
||||
mul cx ; AX/DX = byte offset in FAT (max. 128K)
|
||||
div BT_bytes_per_sector ; AX = FAT sector #, DX = byte offset
|
||||
push dx ; save byte offset within sector
|
||||
call locate_FAT ; get FAT sector AX
|
||||
pop bx ; BX = offset within sector
|
||||
mov cx,word ptr sector_buffer[bx]
|
||||
; get 16 bit from FAT
|
||||
|
||||
cmp cx,0FFF7h ; check if too large for #
|
||||
jae next_cluster_eof ; set carry, EOF
|
||||
clc
|
||||
jmps next_cluster_ret ; good link
|
||||
|
||||
next_cluster12: ; DOS 2.x disk
|
||||
push cx ; save cluster number
|
||||
mov bx,cx
|
||||
add bx,bx ; BX = cluster# * 2
|
||||
add bx,cx ; BX = cluster# * 3
|
||||
shr bx,1 ; BX = cluster# * 1.5
|
||||
push bx ; save offset in the FAT
|
||||
inc bx ; BX = offset of high byte
|
||||
call get_FAT_byte ; get the high byte in AL
|
||||
pop bx ; BX = offset of low byte
|
||||
push ax ; save high byte on stack
|
||||
call get_FAT_byte ; get the low byte in AL
|
||||
pop bx ; pop off high byte into BL
|
||||
mov ah,bl ; set high byte, AX = word
|
||||
pop cx ; restore cluster number
|
||||
shr cx,1 ; test if even or odd
|
||||
jnc even_fat ; if even entry, done
|
||||
mov cl,4 ; odd entry, shift down one nibble
|
||||
shr ax,cl ; else need to justify
|
||||
even_fat: ; even entry, strip off top bits
|
||||
and ax,0fffh ; bx[0..11] are cluster
|
||||
mov cx,ax ; CX = cluster number
|
||||
cmp cx,0ff7h ; compare with largest legal 12 bit #
|
||||
jae next_cluster_eof ; check for end mark
|
||||
clc
|
||||
jmps next_cluster_ret ; return value in CX, CY = 0
|
||||
next_cluster_eof:
|
||||
mov cx,-1 ; indicate end of chain
|
||||
stc ; end of chain
|
||||
next_cluster_ret:
|
||||
pop bx ! pop dx
|
||||
ret
|
||||
|
||||
|
||||
eject
|
||||
;
|
||||
; INITIALIZED DATA SEGMENT
|
||||
; ========================
|
||||
INITDATA dseg 'INITDATA'
|
||||
|
||||
extrn resdev_chain:dword ; resident device driver root
|
||||
extrn current_dos:word ; current BDOS segment
|
||||
extrn boot_device:dword ; device driver we boot from
|
||||
extrn boot_drv:byte ; boot drive
|
||||
extrn dos_name:byte ; name of BDOS file
|
||||
|
||||
strat_ptr rd 0
|
||||
strat_off rw 1
|
||||
strat_seg rw 1
|
||||
|
||||
intrpt_ptr rd 0
|
||||
intrpt_off rw 1
|
||||
intrpt_seg rw 1
|
||||
|
||||
dta_ptr rd 0
|
||||
dta_off rw 1
|
||||
dta_seg rw 1
|
||||
|
||||
start_cluster rw 1
|
||||
cluster_count rw 1
|
||||
|
||||
current_fatsec dw -1 ; no FAT sector read yet
|
||||
fat16 dw 0 ; defaults to 12 bit FAT
|
||||
|
||||
; single error message if BDOS can't be loaded:
|
||||
|
||||
|
||||
include initmsgs.def ; Include TFT Header File
|
||||
|
||||
|
||||
;dos_msg db CR,LF,'Can''t load DOS file.$'
|
||||
|
||||
|
||||
; static request header for DOS device driver I/O
|
||||
|
||||
req_hdr db 22
|
||||
req_unit rb 1
|
||||
req_cmd rb 1
|
||||
req_status rw 1
|
||||
rd 2
|
||||
req_media rb 1
|
||||
rb 16
|
||||
|
||||
req1_return equ byte ptr req_media+1
|
||||
req1_volid equ word ptr req_media+2
|
||||
|
||||
req2_bufoff equ word ptr req_media+1
|
||||
req2_bufseg equ word ptr req_media+3
|
||||
req2_bpb equ word ptr req_media+5
|
||||
|
||||
req3_buffer equ dword ptr req_media+1
|
||||
req3_bufoff equ word ptr req_media+1
|
||||
req3_bufseg equ word ptr req_media+3
|
||||
req3_count equ word ptr req_media+5
|
||||
req3_sector equ word ptr req_media+7
|
||||
req3_volid equ word ptr req_media+9
|
||||
req3_sector32 equ word ptr req_media+13
|
||||
|
||||
; local copy of the BPB for the boot device
|
||||
|
||||
local_bpb rb 0
|
||||
BT_bytes_per_sector rw 1
|
||||
BT_sctr_per_cluster rb 1
|
||||
BT_reserved_sectors rw 1
|
||||
BT_nfats rb 1
|
||||
BT_dirsize rw 1
|
||||
BT_total_sectors rw 1
|
||||
BT_fatid rb 1
|
||||
BT_fat_size rw 1
|
||||
BT_sectors_per_track rw 1
|
||||
BT_nheads rw 1
|
||||
BT_hidden_sectors rw 2
|
||||
BT_total_long rw 2
|
||||
BPB_LENGTH equ (offset $-offset local_bpb)
|
||||
|
||||
extrn sector_buffer:byte
|
||||
|
||||
end
|
||||
48
IBMBIO/BDOSSTUB.A86
Normal file
48
IBMBIO/BDOSSTUB.A86
Normal file
@@ -0,0 +1,48 @@
|
||||
; File : $BDOSSTUB.A86$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
CGROUP group INITCODE
|
||||
|
||||
INITCODE cseg 'INITCODE'
|
||||
|
||||
public read_bdos
|
||||
read_bdos:
|
||||
ret
|
||||
|
||||
|
||||
public bdos_version_check
|
||||
bdos_version_check:
|
||||
ret
|
||||
|
||||
end
|
||||
BIN
IBMBIO/BIN/BDOSLDR.OBJ
Normal file
BIN
IBMBIO/BIN/BDOSLDR.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/BDOSSTUB.OBJ
Normal file
BIN
IBMBIO/BIN/BDOSSTUB.OBJ
Normal file
Binary file not shown.
418
IBMBIO/BIN/BIOS.MAP
Normal file
418
IBMBIO/BIN/BIOS.MAP
Normal file
@@ -0,0 +1,418 @@
|
||||
LINK : warning L4021: no stack segment
|
||||
|
||||
Start Stop Length Name Class
|
||||
00000H 00616H 00617H CODE CODE
|
||||
00617H 00617H 00000H ENDCODE ENDCODE
|
||||
00620H 0171FH 01100H RCODE_ALIGN RCODE
|
||||
01720H 02692H 00F73H RCODE RCODE
|
||||
026A0H 027AFH 00110H RESUMECODE RESUMECODE
|
||||
027B0H 031DFH 00A30H RESBIOS RESBIOS
|
||||
031E0H 03905H 00726H ICODE ICODE
|
||||
03910H 0391FH 00010H IDATA IDATA
|
||||
03920H 064F5H 02BD6H INITCODE INITCODE
|
||||
06500H 06637H 00138H STACKS STACKS
|
||||
06640H 079A6H 01367H INITDATA INITDATA
|
||||
079B0H 07A1FH 00070H INITPSP INITDATA
|
||||
07A20H 07B9DH 0017EH INITENV INITDATA
|
||||
07BA0H 07BA0H 00000H DATAEND INITDATA
|
||||
|
||||
Origin Group
|
||||
0000:0 CGROUP
|
||||
|
||||
Address Publics by Name
|
||||
|
||||
0000:0000 A20ENABLE
|
||||
0000:4043 ALLOCHMA
|
||||
0000:417C ALLOC_HISEG
|
||||
0000:414F ALLOC_INSTSEG
|
||||
0000:41A4 ALLOC_SEG
|
||||
0000:77C4 BAD_BREAK
|
||||
0000:77EA BAD_BUFFERS
|
||||
0000:7746 BAD_COMMAND
|
||||
0000:7931 BAD_COUNTRY
|
||||
0000:787F BAD_DRIVPARM
|
||||
0000:7948 BAD_EXEC
|
||||
0000:782E BAD_FCBS
|
||||
0000:776B BAD_FILENAME
|
||||
0000:7806 BAD_FILES
|
||||
0000:7848 BAD_FOPEN
|
||||
0000:78E8 BAD_HISTORY
|
||||
0000:779A BAD_LASTDRIVE
|
||||
0000:7781 BAD_SHELL
|
||||
0000:396E BIOSINIT
|
||||
0000:7BA0 BIOSINIT_END
|
||||
0000:66B8 BIOS_SEG
|
||||
0000:667A BIOS_TARGET_SEG
|
||||
0000:6C08 BLKDEV_TABLE
|
||||
0000:474E BLOCK_DEVICE
|
||||
0000:6BE7 BOOT_DEVICE
|
||||
0000:6BEB BOOT_DRV
|
||||
0000:7B80 BOOT_OPTIONS
|
||||
0000:0434 BPB160
|
||||
0000:0491 BPB360
|
||||
0000:04CF BPB720
|
||||
0000:31E0 BPBS
|
||||
0000:0537 BPBTBL
|
||||
0000:6BE2 BUFFERSIN
|
||||
0000:4BCA BUILD_CMD_TAIL
|
||||
0000:7203 CFG_FILE
|
||||
0000:724F CFG_FILE_END
|
||||
0000:001A CLEANUP
|
||||
0000:6BF0 CLKDEV_OFF
|
||||
0000:6BF2 CLKDEV_SEG
|
||||
0000:17DC CLOCKTABLE
|
||||
0000:669C CODE_PAGE
|
||||
0000:668F COMSPEC_DRV
|
||||
0000:6BF4 CONDEV_OFF
|
||||
0000:6BF6 CONDEV_SEG
|
||||
0000:443B CONFIG
|
||||
0000:4978 CONFIG_FINISH
|
||||
0000:4400 CONFIG_INIT
|
||||
0000:4C50 CONFIG_PROCESS
|
||||
0000:1900 CONSOLETABLE
|
||||
0000:022A CONTROLBREAK
|
||||
0000:669A COUNTRY_CODE
|
||||
0000:4401 COUNTRY_INIT
|
||||
0000:5A4A CRLF
|
||||
0000:7175 CTRY_INFO
|
||||
0000:6676 CURRENT_DOS
|
||||
0000:1722 DATASEGMENT
|
||||
0000:0232 DAYCOUNT
|
||||
0000:7171 DBCS_TBL
|
||||
0000:0184 DEBLOCKSEG
|
||||
0000:71CA DEBLOCKSETBYUSER
|
||||
0000:461C DEVICE_INIT
|
||||
0000:4947 DEVICE_INSERT
|
||||
0000:6684 DEVICE_ROOT
|
||||
0000:6BE3 DEV_COUNT
|
||||
0000:6D6C DEV_EPB
|
||||
0000:6D6C DEV_LOAD_SEG
|
||||
0000:6D1C DEV_NAME
|
||||
0000:6D6E DEV_RELOC_SEG
|
||||
0000:1B97 DISKTABLE
|
||||
0000:262A DISK_MSGA
|
||||
0000:2647 DISK_MSGB
|
||||
0000:266E DIV_BY_ZERO_MSG
|
||||
0000:7A00 DOSVERSION
|
||||
0000:66BC DOS_DSEG
|
||||
0000:798F DOS_MSG
|
||||
0000:669E DOS_NAME
|
||||
0000:6678 DOS_TARGET_SEG
|
||||
0000:61E3 DOS_VERSION_CHECK
|
||||
0000:6664 DRDOS_PTR
|
||||
0000:1724 DRIVERFUNCTION
|
||||
0000:0602 ENDBIOS
|
||||
0000:668A EXT_MEM_SIZE
|
||||
0000:020C FASTCONSOLE
|
||||
0000:6660 FUNC52_PTR
|
||||
0000:66D0 HIDOS
|
||||
0000:6ADA HISTORY_FLG
|
||||
0000:6ADB HISTORY_SIZE
|
||||
0000:3F43 HOOKINT2F
|
||||
0000:00B4 I13OFF_SAVE
|
||||
0000:00B4 I13POINTER
|
||||
0000:00B6 I13SEG_SAVE
|
||||
0000:0610 I13_AX
|
||||
0000:6670 ICODE_LEN
|
||||
0000:31F4 INIT0
|
||||
0000:6420 INITSTACKS
|
||||
0000:6BE0 INIT_BUF
|
||||
0000:668E INIT_DRV
|
||||
0000:66BA INIT_DSEG
|
||||
0000:668C INIT_FLAGS
|
||||
0000:391A INIT_RUNIT
|
||||
0000:46D2 INIT_STATIC_REQUEST
|
||||
0000:1A11 INT13DEBLOCK
|
||||
0000:01C0 INT13TRAP
|
||||
0000:1A04 INT13UNSURE
|
||||
0000:1B2D INT2FHANDLER
|
||||
0000:01F7 INT2FTRAP
|
||||
0000:01B6 INTDISKTABLE
|
||||
0000:6CF6 INTERRUPT
|
||||
0000:6CF6 INTERRUPT_OFF
|
||||
0000:6CF8 INTERRUPT_SEG
|
||||
0000:66D5 LAST_DRV
|
||||
0000:0537 LAYOUT_TABLE
|
||||
0000:0234 LOCAL_BUFFER
|
||||
0000:0600 LOCAL_CHAR
|
||||
0000:0601 LOCAL_FLAG
|
||||
0000:0432 LOCAL_ID
|
||||
0000:052C LOCAL_PARMS
|
||||
0000:03F2 LOCAL_PT
|
||||
0000:6BEE MAX_CLSIZE
|
||||
0000:6BEC MAX_SECSIZE
|
||||
0000:66C2 MEM_CURRENT
|
||||
0000:66C0 MEM_CURRENT_BASE
|
||||
0000:66C4 MEM_MAX
|
||||
0000:6688 MEM_SIZE
|
||||
0000:0008 Abs NBPBS
|
||||
0000:6BE4 NEXT_DRV
|
||||
0000:5EF0 NLS_HOOK
|
||||
0000:6D70 NLS_TEMP_AREA
|
||||
0000:5F0C NLS_UNHOOK
|
||||
0000:7743 NO_CHAR
|
||||
0000:0178 NUMDISKUNITS
|
||||
0000:6BE5 NUM_BLKDEV
|
||||
0000:6696 NUM_FCBS
|
||||
0000:6694 NUM_FILES
|
||||
0000:6698 NUM_FOPEN
|
||||
0000:6BE1 NUM_READ_AHEAD_BUF
|
||||
0000:6690 NUM_STACKS
|
||||
0000:0106 ORGINT13
|
||||
0000:0533 PARMS_GPL
|
||||
0000:0530 PARMS_SPT
|
||||
0000:71D2 PRELOAD_DRV
|
||||
0000:6674 RCODE_FIXUPS
|
||||
0000:6672 RCODE_LEN
|
||||
0000:666C RCODE_OFFSET
|
||||
0000:666E RCODE_SEG
|
||||
0000:6132 READ_DOS
|
||||
0000:18E0 READ_SYSTEM_TICKS
|
||||
0000:6C06 REL_UNIT
|
||||
0000:6CFE REQUEST_HDR
|
||||
0000:00B8 REQ_OFF
|
||||
0000:00B8 REQ_PTR
|
||||
0000:00BA REQ_SEG
|
||||
0000:6C00 RESDEV_CHAIN
|
||||
0000:462F RESIDENT_DEVICE_INIT
|
||||
0000:26A0 RESUMEHANDLER
|
||||
0000:6668 RES_DDSC_PTR
|
||||
0000:6D70 SECTOR_BUFFER
|
||||
0000:001F SERPARCHAR
|
||||
0000:24CE SERPARCOMMONTABLE
|
||||
0000:001B SERPARFLAG
|
||||
0000:40B8 SETUPHMA
|
||||
0000:48AE SETUP_LDT
|
||||
0000:45C2 SETUP_STACKS
|
||||
0000:7A22 SHELL
|
||||
0000:670F SHELL_CLINE
|
||||
0000:6692 STACK_SIZE
|
||||
0000:267F STARTING_DOS_MSG
|
||||
0000:00BC STRAT
|
||||
0000:6CF2 STRATEGY
|
||||
0000:6CF2 STRATEGY_OFF
|
||||
0000:6CF4 STRATEGY_SEG
|
||||
0000:3F68 UNHOOKINT2F
|
||||
0000:43E8 VERIFY386
|
||||
0000:4BBF WHITESPACE
|
||||
0000:7740 YES_CHAR
|
||||
0000:77C4 _BAD_BREAK
|
||||
0000:77EA _BAD_BUFFERS
|
||||
0000:7746 _BAD_COMMAND
|
||||
0000:7931 _BAD_COUNTRY
|
||||
0000:787F _BAD_DRIVPARM
|
||||
0000:7948 _BAD_EXEC
|
||||
0000:782E _BAD_FCBS
|
||||
0000:776B _BAD_FILENAME
|
||||
0000:7806 _BAD_FILES
|
||||
0000:7848 _BAD_FOPEN
|
||||
0000:78E8 _BAD_HISTORY
|
||||
0000:779A _BAD_LASTDRIVE
|
||||
0000:7781 _BAD_SHELL
|
||||
0000:262A _DISK_MSGA
|
||||
0000:2647 _DISK_MSGB
|
||||
0000:266E _DIV_BY_ZERO_MSG
|
||||
0000:798F _DOS_MSG
|
||||
0000:7743 _NO_CHAR
|
||||
0000:267F _STARTING_DOS_MSG
|
||||
0000:7740 _YES_CHAR
|
||||
|
||||
Address Publics by Value
|
||||
|
||||
0000:0000 A20ENABLE
|
||||
0000:0008 Abs NBPBS
|
||||
0000:001A CLEANUP
|
||||
0000:001B SERPARFLAG
|
||||
0000:001F SERPARCHAR
|
||||
0000:00B4 I13OFF_SAVE
|
||||
0000:00B4 I13POINTER
|
||||
0000:00B6 I13SEG_SAVE
|
||||
0000:00B8 REQ_PTR
|
||||
0000:00B8 REQ_OFF
|
||||
0000:00BA REQ_SEG
|
||||
0000:00BC STRAT
|
||||
0000:0106 ORGINT13
|
||||
0000:0178 NUMDISKUNITS
|
||||
0000:0184 DEBLOCKSEG
|
||||
0000:01B6 INTDISKTABLE
|
||||
0000:01C0 INT13TRAP
|
||||
0000:01F7 INT2FTRAP
|
||||
0000:020C FASTCONSOLE
|
||||
0000:022A CONTROLBREAK
|
||||
0000:0232 DAYCOUNT
|
||||
0000:0234 LOCAL_BUFFER
|
||||
0000:03F2 LOCAL_PT
|
||||
0000:0432 LOCAL_ID
|
||||
0000:0434 BPB160
|
||||
0000:0491 BPB360
|
||||
0000:04CF BPB720
|
||||
0000:052C LOCAL_PARMS
|
||||
0000:0530 PARMS_SPT
|
||||
0000:0533 PARMS_GPL
|
||||
0000:0537 LAYOUT_TABLE
|
||||
0000:0537 BPBTBL
|
||||
0000:0600 LOCAL_CHAR
|
||||
0000:0601 LOCAL_FLAG
|
||||
0000:0602 ENDBIOS
|
||||
0000:0610 I13_AX
|
||||
0000:1722 DATASEGMENT
|
||||
0000:1724 DRIVERFUNCTION
|
||||
0000:17DC CLOCKTABLE
|
||||
0000:18E0 READ_SYSTEM_TICKS
|
||||
0000:1900 CONSOLETABLE
|
||||
0000:1A04 INT13UNSURE
|
||||
0000:1A11 INT13DEBLOCK
|
||||
0000:1B2D INT2FHANDLER
|
||||
0000:1B97 DISKTABLE
|
||||
0000:24CE SERPARCOMMONTABLE
|
||||
0000:262A DISK_MSGA
|
||||
0000:262A _DISK_MSGA
|
||||
0000:2647 DISK_MSGB
|
||||
0000:2647 _DISK_MSGB
|
||||
0000:266E _DIV_BY_ZERO_MSG
|
||||
0000:266E DIV_BY_ZERO_MSG
|
||||
0000:267F _STARTING_DOS_MSG
|
||||
0000:267F STARTING_DOS_MSG
|
||||
0000:26A0 RESUMEHANDLER
|
||||
0000:31E0 BPBS
|
||||
0000:31F4 INIT0
|
||||
0000:391A INIT_RUNIT
|
||||
0000:396E BIOSINIT
|
||||
0000:3F43 HOOKINT2F
|
||||
0000:3F68 UNHOOKINT2F
|
||||
0000:4043 ALLOCHMA
|
||||
0000:40B8 SETUPHMA
|
||||
0000:414F ALLOC_INSTSEG
|
||||
0000:417C ALLOC_HISEG
|
||||
0000:41A4 ALLOC_SEG
|
||||
0000:43E8 VERIFY386
|
||||
0000:4400 CONFIG_INIT
|
||||
0000:4401 COUNTRY_INIT
|
||||
0000:443B CONFIG
|
||||
0000:45C2 SETUP_STACKS
|
||||
0000:461C DEVICE_INIT
|
||||
0000:462F RESIDENT_DEVICE_INIT
|
||||
0000:46D2 INIT_STATIC_REQUEST
|
||||
0000:474E BLOCK_DEVICE
|
||||
0000:48AE SETUP_LDT
|
||||
0000:4947 DEVICE_INSERT
|
||||
0000:4978 CONFIG_FINISH
|
||||
0000:4BBF WHITESPACE
|
||||
0000:4BCA BUILD_CMD_TAIL
|
||||
0000:4C50 CONFIG_PROCESS
|
||||
0000:5A4A CRLF
|
||||
0000:5EF0 NLS_HOOK
|
||||
0000:5F0C NLS_UNHOOK
|
||||
0000:6132 READ_DOS
|
||||
0000:61E3 DOS_VERSION_CHECK
|
||||
0000:6420 INITSTACKS
|
||||
0000:6660 FUNC52_PTR
|
||||
0000:6664 DRDOS_PTR
|
||||
0000:6668 RES_DDSC_PTR
|
||||
0000:666C RCODE_OFFSET
|
||||
0000:666E RCODE_SEG
|
||||
0000:6670 ICODE_LEN
|
||||
0000:6672 RCODE_LEN
|
||||
0000:6674 RCODE_FIXUPS
|
||||
0000:6676 CURRENT_DOS
|
||||
0000:6678 DOS_TARGET_SEG
|
||||
0000:667A BIOS_TARGET_SEG
|
||||
0000:6684 DEVICE_ROOT
|
||||
0000:6688 MEM_SIZE
|
||||
0000:668A EXT_MEM_SIZE
|
||||
0000:668C INIT_FLAGS
|
||||
0000:668E INIT_DRV
|
||||
0000:668F COMSPEC_DRV
|
||||
0000:6690 NUM_STACKS
|
||||
0000:6692 STACK_SIZE
|
||||
0000:6694 NUM_FILES
|
||||
0000:6696 NUM_FCBS
|
||||
0000:6698 NUM_FOPEN
|
||||
0000:669A COUNTRY_CODE
|
||||
0000:669C CODE_PAGE
|
||||
0000:669E DOS_NAME
|
||||
0000:66B8 BIOS_SEG
|
||||
0000:66BA INIT_DSEG
|
||||
0000:66BC DOS_DSEG
|
||||
0000:66C0 MEM_CURRENT_BASE
|
||||
0000:66C2 MEM_CURRENT
|
||||
0000:66C4 MEM_MAX
|
||||
0000:66D0 HIDOS
|
||||
0000:66D5 LAST_DRV
|
||||
0000:670F SHELL_CLINE
|
||||
0000:6ADA HISTORY_FLG
|
||||
0000:6ADB HISTORY_SIZE
|
||||
0000:6BE0 INIT_BUF
|
||||
0000:6BE1 NUM_READ_AHEAD_BUF
|
||||
0000:6BE2 BUFFERSIN
|
||||
0000:6BE3 DEV_COUNT
|
||||
0000:6BE4 NEXT_DRV
|
||||
0000:6BE5 NUM_BLKDEV
|
||||
0000:6BE7 BOOT_DEVICE
|
||||
0000:6BEB BOOT_DRV
|
||||
0000:6BEC MAX_SECSIZE
|
||||
0000:6BEE MAX_CLSIZE
|
||||
0000:6BF0 CLKDEV_OFF
|
||||
0000:6BF2 CLKDEV_SEG
|
||||
0000:6BF4 CONDEV_OFF
|
||||
0000:6BF6 CONDEV_SEG
|
||||
0000:6C00 RESDEV_CHAIN
|
||||
0000:6C06 REL_UNIT
|
||||
0000:6C08 BLKDEV_TABLE
|
||||
0000:6CF2 STRATEGY
|
||||
0000:6CF2 STRATEGY_OFF
|
||||
0000:6CF4 STRATEGY_SEG
|
||||
0000:6CF6 INTERRUPT_OFF
|
||||
0000:6CF6 INTERRUPT
|
||||
0000:6CF8 INTERRUPT_SEG
|
||||
0000:6CFE REQUEST_HDR
|
||||
0000:6D1C DEV_NAME
|
||||
0000:6D6C DEV_LOAD_SEG
|
||||
0000:6D6C DEV_EPB
|
||||
0000:6D6E DEV_RELOC_SEG
|
||||
0000:6D70 NLS_TEMP_AREA
|
||||
0000:6D70 SECTOR_BUFFER
|
||||
0000:7171 DBCS_TBL
|
||||
0000:7175 CTRY_INFO
|
||||
0000:71CA DEBLOCKSETBYUSER
|
||||
0000:71D2 PRELOAD_DRV
|
||||
0000:7203 CFG_FILE
|
||||
0000:724F CFG_FILE_END
|
||||
0000:7740 YES_CHAR
|
||||
0000:7740 _YES_CHAR
|
||||
0000:7743 _NO_CHAR
|
||||
0000:7743 NO_CHAR
|
||||
0000:7746 _BAD_COMMAND
|
||||
0000:7746 BAD_COMMAND
|
||||
0000:776B _BAD_FILENAME
|
||||
0000:776B BAD_FILENAME
|
||||
0000:7781 _BAD_SHELL
|
||||
0000:7781 BAD_SHELL
|
||||
0000:779A BAD_LASTDRIVE
|
||||
0000:779A _BAD_LASTDRIVE
|
||||
0000:77C4 _BAD_BREAK
|
||||
0000:77C4 BAD_BREAK
|
||||
0000:77EA BAD_BUFFERS
|
||||
0000:77EA _BAD_BUFFERS
|
||||
0000:7806 _BAD_FILES
|
||||
0000:7806 BAD_FILES
|
||||
0000:782E BAD_FCBS
|
||||
0000:782E _BAD_FCBS
|
||||
0000:7848 BAD_FOPEN
|
||||
0000:7848 _BAD_FOPEN
|
||||
0000:787F _BAD_DRIVPARM
|
||||
0000:787F BAD_DRIVPARM
|
||||
0000:78E8 _BAD_HISTORY
|
||||
0000:78E8 BAD_HISTORY
|
||||
0000:7931 _BAD_COUNTRY
|
||||
0000:7931 BAD_COUNTRY
|
||||
0000:7948 _BAD_EXEC
|
||||
0000:7948 BAD_EXEC
|
||||
0000:798F _DOS_MSG
|
||||
0000:798F DOS_MSG
|
||||
0000:7A00 DOSVERSION
|
||||
0000:7A22 SHELL
|
||||
0000:7B80 BOOT_OPTIONS
|
||||
0000:7BA0 BIOSINIT_END
|
||||
|
||||
Program entry point at 0000:0000
|
||||
BIN
IBMBIO/BIN/BIOSGRPS.OBJ
Normal file
BIN
IBMBIO/BIN/BIOSGRPS.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/BIOSINIT.OBJ
Normal file
BIN
IBMBIO/BIN/BIOSINIT.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/BIOSMSGS.OBJ
Normal file
BIN
IBMBIO/BIN/BIOSMSGS.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/BIOSSTUB.LIB
Normal file
BIN
IBMBIO/BIN/BIOSSTUB.LIB
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/CLOCK.OBJ
Normal file
BIN
IBMBIO/BIN/CLOCK.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/CONFIG.OBJ
Normal file
BIN
IBMBIO/BIN/CONFIG.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/CONFSTUB.OBJ
Normal file
BIN
IBMBIO/BIN/CONFSTUB.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/CONSOLE.OBJ
Normal file
BIN
IBMBIO/BIN/CONSOLE.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/DISK.OBJ
Normal file
BIN
IBMBIO/BIN/DISK.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/GENERCFG.OBJ
Normal file
BIN
IBMBIO/BIN/GENERCFG.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/IBMBIO.COM
Normal file
BIN
IBMBIO/BIN/IBMBIO.COM
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/INIT.OBJ
Normal file
BIN
IBMBIO/BIN/INIT.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/INITMSGS.OBJ
Normal file
BIN
IBMBIO/BIN/INITMSGS.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/NLSFUNC.OBJ
Normal file
BIN
IBMBIO/BIN/NLSFUNC.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/SERPAR.OBJ
Normal file
BIN
IBMBIO/BIN/SERPAR.OBJ
Normal file
Binary file not shown.
BIN
IBMBIO/BIN/STACKS.OBJ
Normal file
BIN
IBMBIO/BIN/STACKS.OBJ
Normal file
Binary file not shown.
4
IBMBIO/BIOS.LNK
Normal file
4
IBMBIO/BIOS.LNK
Normal file
@@ -0,0 +1,4 @@
|
||||
.\bin\biosgrps+.\bin\init+.\bin\clock+.\bin\console+.\bin\disk+
|
||||
.\bin\serpar+.\bin\biosmsgs+.\bin\biosinit+.\bin\config+.\bin\genercfg+
|
||||
.\bin\nlsfunc+.\bin\bdosldr+.\bin\stacks+.\bin\initmsgs
|
||||
.\bin\bios,.\bin\bios,.\bin\biosstub.lib /MAP;
|
||||
39
IBMBIO/BIOSGRPS.ASM
Normal file
39
IBMBIO/BIOSGRPS.ASM
Normal file
@@ -0,0 +1,39 @@
|
||||
; File : $BIOSGRPS.ASM$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
CGROUP group CODE,ENDCODE,RCODE_ALIGN,RCODE,RESUMECODE,RESBIOS,ICODE,IDATA,INITCODE,STACKS,INITDATA,INITPSP,INITENV,DATAEND
|
||||
|
||||
include BIOSGRPS.EQU
|
||||
|
||||
end
|
||||
75
IBMBIO/BIOSGRPS.EQU
Normal file
75
IBMBIO/BIOSGRPS.EQU
Normal file
@@ -0,0 +1,75 @@
|
||||
; File : $BIOSGRPS.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
CODE segment public byte 'CODE'
|
||||
CODE ends
|
||||
|
||||
ENDCODE segment public byte 'ENDCODE'
|
||||
ENDCODE ends
|
||||
|
||||
RCODE_ALIGN segment public para 'RCODE'
|
||||
RCODE_ALIGN ends
|
||||
|
||||
RCODE segment public word 'RCODE'
|
||||
RCODE ends
|
||||
|
||||
RESUMECODE segment public para 'RESUMECODE'
|
||||
RESUMECODE ends
|
||||
|
||||
RESBIOS segment public para 'RESBIOS'
|
||||
RESBIOS ends
|
||||
|
||||
ICODE segment public word 'ICODE'
|
||||
ICODE ends
|
||||
|
||||
IDATA segment public para 'IDATA'
|
||||
IDATA ends
|
||||
|
||||
INITCODE segment public para 'INITCODE'
|
||||
INITCODE ends
|
||||
|
||||
STACKS segment public para 'STACKS'
|
||||
STACKS ends
|
||||
|
||||
INITDATA segment public para 'INITDATA'
|
||||
INITDATA ends
|
||||
|
||||
INITPSP segment public para 'INITDATA'
|
||||
INITPSP ends
|
||||
|
||||
INITENV segment public para 'INITDATA'
|
||||
INITENV ends
|
||||
|
||||
DATAEND segment public para 'INITDATA'
|
||||
DATAEND ends
|
||||
|
||||
1805
IBMBIO/BIOSINIT.A86
Normal file
1805
IBMBIO/BIOSINIT.A86
Normal file
File diff suppressed because it is too large
Load Diff
36
IBMBIO/BIOSMSGS.ASM
Normal file
36
IBMBIO/BIOSMSGS.ASM
Normal file
@@ -0,0 +1,36 @@
|
||||
NUL equ 0
|
||||
BS equ 8
|
||||
TAB equ 9
|
||||
LF equ 10
|
||||
CR equ 13
|
||||
|
||||
include BIOSGRPS.EQU
|
||||
|
||||
CGROUP group RCODE
|
||||
|
||||
|
||||
RCODE segment word public 'RCODE'
|
||||
|
||||
; Source .TFT file: 'TMP1.$$$'
|
||||
public _disk_msgA
|
||||
public disk_msgA
|
||||
disk_msgA label byte
|
||||
_disk_msgA db CR, LF, "Insert diskette for drive ", NUL
|
||||
public _disk_msgB
|
||||
public disk_msgB
|
||||
disk_msgB label byte
|
||||
_disk_msgB db ": and", CR, LF, " strike any key when ready", CR, LF, LF, NUL
|
||||
public _div_by_zero_msg
|
||||
public div_by_zero_msg
|
||||
div_by_zero_msg label byte
|
||||
_div_by_zero_msg db CR, LF, "Divide Error", CR, LF, NUL
|
||||
public _starting_dos_msg
|
||||
public starting_dos_msg
|
||||
starting_dos_msg label byte
|
||||
_starting_dos_msg db CR, LF, "Starting DOS...", CR, LF, NUL
|
||||
|
||||
RCODE ends
|
||||
|
||||
|
||||
end
|
||||
|
||||
8
IBMBIO/BIOSMSGS.DEF
Normal file
8
IBMBIO/BIOSMSGS.DEF
Normal file
@@ -0,0 +1,8 @@
|
||||
extrn _disk_msgA : byte
|
||||
extrn disk_msgA : byte
|
||||
extrn _disk_msgB : byte
|
||||
extrn disk_msgB : byte
|
||||
extrn _div_by_zero_msg : byte
|
||||
extrn div_by_zero_msg : byte
|
||||
extrn _starting_dos_msg : byte
|
||||
extrn starting_dos_msg : byte
|
||||
4
IBMBIO/BIOSMSGS.H
Normal file
4
IBMBIO/BIOSMSGS.H
Normal file
@@ -0,0 +1,4 @@
|
||||
extern char near disk_msgA[];
|
||||
extern char near disk_msgB[];
|
||||
extern char near div_by_zero_msg[];
|
||||
extern char near starting_dos_msg[];
|
||||
BIN
IBMBIO/BIOSSTUB.LIB
Normal file
BIN
IBMBIO/BIOSSTUB.LIB
Normal file
Binary file not shown.
50
IBMBIO/BPB.EQU
Normal file
50
IBMBIO/BPB.EQU
Normal file
@@ -0,0 +1,50 @@
|
||||
; File : $BPB.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
; ENDLOG
|
||||
|
||||
BPB struc
|
||||
BPB_SECSIZ dw ? ; # of bytes per sector
|
||||
BPB_ALLOCSIZ db ? ; # of sectors per allocation unit
|
||||
BPB_FATADD dw ? ; # of reserved sectors (1)
|
||||
BPB_NFATS db ? ; # of fats
|
||||
BPB_DIRMAX dw ? ; # of directory entries
|
||||
BPB_TOTSEC dw ? ; # of sectors total in image
|
||||
BPB_FATID db ? ; holds a copy of the fat id byte
|
||||
BPB_FATSEC dw ? ; # of sectors in a fat
|
||||
BPB_SPT dw ? ; # of sectors per track
|
||||
BPB_HEADS dw ? ; # of heads
|
||||
BPB_HIDDEN dd ? ; disk offset (32 bit)
|
||||
BPB_SIZE dd ? ; disk size (32 bit)
|
||||
BPB_RESRVD2 db 6 dup (?)
|
||||
BPB ends
|
||||
|
||||
BPB_LENGTH equ size BPB
|
||||
74
IBMBIO/CHAR.DEF
Normal file
74
IBMBIO/CHAR.DEF
Normal file
@@ -0,0 +1,74 @@
|
||||
; File : $CHAR.DEF$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
;************************************************;
|
||||
;* *;
|
||||
;* Character Definitions *;
|
||||
;* *;
|
||||
;************************************************;
|
||||
|
||||
CTLA equ 'A' - '@'
|
||||
CTLB equ 'B' - '@'
|
||||
CTLC equ 'C' - '@'
|
||||
CTLD equ 'D' - '@'
|
||||
CTLE equ 'E' - '@'
|
||||
CTLF equ 'F' - '@'
|
||||
CTLG equ 'G' - '@'
|
||||
BELL equ 'G' - '@'
|
||||
CTLH equ 'H' - '@'
|
||||
CTLI equ 'I' - '@'
|
||||
TAB equ 'I' - '@'
|
||||
CTLJ equ 'J' - '@'
|
||||
LF equ 'J' - '@'
|
||||
CTLK equ 'K' - '@'
|
||||
CTLM equ 'M' - '@'
|
||||
CR equ 'M' - '@'
|
||||
CTLP equ 'P' - '@'
|
||||
CTLQ equ 'Q' - '@'
|
||||
CTLR equ 'R' - '@'
|
||||
CTLS equ 'S' - '@'
|
||||
CTLT equ 'T' - '@'
|
||||
CTLU equ 'U' - '@'
|
||||
CTLV equ 'V' - '@'
|
||||
CTLW equ 'W' - '@'
|
||||
CTLX equ 'X' - '@'
|
||||
CTLY equ 'Y' - '@'
|
||||
CTLZ equ 'Z' - '@'
|
||||
ESC equ '[' - '@'
|
||||
CTLBS equ '\' - '@'
|
||||
CTLUB equ '_' - '@'
|
||||
CTLUP equ '^' - '@'
|
||||
DEL equ 07Fh
|
||||
RUBOUT equ DEL
|
||||
|
||||
CTL equ '^'
|
||||
467
IBMBIO/CLOCK.ASM
Normal file
467
IBMBIO/CLOCK.ASM
Normal file
@@ -0,0 +1,467 @@
|
||||
; File : $CLOCK.ASM$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
; CLOCK.ASM 1.12 93/07/22 19:43:10
|
||||
; switch over to REQUEST.EQU
|
||||
; ENDLOG
|
||||
|
||||
include BIOSGRPS.EQU
|
||||
include DRMACROS.EQU ; standard DR macros
|
||||
include IBMROS.EQU ; ROM BIOS equates
|
||||
include REQUEST.EQU ; request header equates
|
||||
include DRIVER.EQU ; device driver equates
|
||||
|
||||
page
|
||||
CGROUP group CODE, RCODE, RESUMECODE, ICODE
|
||||
|
||||
CG equ offset CGROUP
|
||||
|
||||
TIME struc
|
||||
DAYS dw ?
|
||||
MINUTES db ?
|
||||
HOURS db ?
|
||||
HUNDREDTHS db ?
|
||||
SECONDS db ?
|
||||
TIME ends
|
||||
|
||||
Assume CS:CGROUP, DS:CGROUP, ES:Nothing, SS:Nothing
|
||||
|
||||
CODE segment 'CODE'
|
||||
|
||||
extrn endbios:word ; for device driver INIT function
|
||||
extrn daycount:word
|
||||
|
||||
; There are 1193180/65536 ticks per second, or 0E90Bh/10000h ticks per 5/100th.
|
||||
|
||||
CONVERSION_FACTOR equ 0E90Bh
|
||||
|
||||
CODE ends
|
||||
|
||||
RCODE segment 'RCODE'
|
||||
|
||||
extrn DataSegment:word
|
||||
|
||||
monlen db 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
|
||||
|
||||
|
||||
Public ClockTable
|
||||
|
||||
ClockTable:
|
||||
db 9 ; Last supported function
|
||||
dw CG:dd_init ; 0-initialize driver
|
||||
dw CG:dd_error ; 1-media change check (disks only)
|
||||
dw CG:dd_error ; 2-build BPB (disks only)
|
||||
dw CG:dd_error ; 3-IOCTL string input
|
||||
dw CG:dd_input ; 4-input
|
||||
dw CG:dd_error ; 5-nondestructive input (char only)
|
||||
dw CG:dd_error ; 6-input status (char only)
|
||||
dw CG:dd_error ; 7-input flush
|
||||
dw CG:dd_output ; 8-output
|
||||
dw CG:dd_output ; 9-output with verify
|
||||
|
||||
page
|
||||
driver proc near
|
||||
|
||||
dd_error: ; used for all unsupported driver functions
|
||||
;--------
|
||||
mov ax,RHS_ERROR+3 ; "invalid command" error
|
||||
ret
|
||||
|
||||
dd_input: ; 4-input
|
||||
;--------
|
||||
les di,es:RH4_BUFFER[bx] ; ES:DI -> requested date/time buffer
|
||||
call read_system_ticks ; read system tick counter
|
||||
mov ax,daycount ; AX = date
|
||||
stosw ; return date
|
||||
push dx ; save low word of ticks
|
||||
mov ax,5
|
||||
mul cx ; multiply high word of ticks by 5
|
||||
xchg ax,cx ; save result in CX
|
||||
pop dx
|
||||
mov ax,5
|
||||
mul dx ; multiply low word of tick by 5
|
||||
add dx,cx ; and add in high word
|
||||
mov bx,CONVERSION_FACTOR
|
||||
div bx ; convert to centi-secs
|
||||
push ax ; save high word of result
|
||||
xor ax,ax
|
||||
div bx ; divide remainder
|
||||
pop dx ; recover high word of result
|
||||
; giving us time in centi-secs
|
||||
mov bx,60*100 ; BX = centi-secs/minute
|
||||
div bx ; AX = # minutes
|
||||
push dx ; save centi-secs remainder
|
||||
cwd ; DX = 0
|
||||
mov bx,60+(256*100) ; BL = minutes/hour,BH = centi-secs/sec
|
||||
div bl ; AL = hours, AH = minutes remainder
|
||||
xchg al,ah
|
||||
stosw ; return minutes then hours
|
||||
pop ax ; recover centi-secs remainder
|
||||
div bh ; AL = secs, AH = centi-secs remainder
|
||||
xchg al,ah
|
||||
stosw ; return centi-secs then secs
|
||||
sub ax,ax
|
||||
ret
|
||||
|
||||
page
|
||||
|
||||
dd_output: ; 8-output
|
||||
;---------
|
||||
les si,es:RH4_BUFFER[bx]
|
||||
|
||||
; First we'll convert the date & set the RTC if present:
|
||||
|
||||
mov ax,es:DAYS[si] ; # of days since 1/1/1980
|
||||
mov daycount,ax
|
||||
|
||||
mov dx,1980 ; get initial year
|
||||
output1:
|
||||
mov cx,365 ; assumed year size
|
||||
test dl,3 ; test for leap years
|
||||
jnz output2 ; skip if not a leap year
|
||||
inc cx ; leap years have 366 days
|
||||
output2:
|
||||
cmp ax,cx ; more days than this year?
|
||||
jb output3 ; skip if less - same year
|
||||
sub ax,cx ; else date in future year
|
||||
inc dx ; subtract from total, next year
|
||||
jmps output1 ; check again
|
||||
|
||||
output3: ; DX = binary year, AX = day in year
|
||||
sub bx,bx ; start with January
|
||||
sub cx,cx ; CH = 0
|
||||
output4:
|
||||
mov cl,cs:monlen[bx] ; CX = # of days in next month
|
||||
cmp cl,28 ; is it february ?
|
||||
jne output5
|
||||
test dl,3 ; is it a leap year ?
|
||||
jnz output5
|
||||
inc cx ; leap years have 29 days in february
|
||||
output5:
|
||||
cmp ax,cx ; remaining day count >= month length?
|
||||
jb output6 ; skip if right month found
|
||||
sub ax,cx ; else subtract days in that month
|
||||
inc bx ; move on to next month
|
||||
jmps output4 ; repeat until month found
|
||||
|
||||
output6: ; DX = binary year
|
||||
inc ax ; AX = day-1 => convert to day
|
||||
inc bx ; BX = month-1 => convert to month
|
||||
mov ah,bl ; high byte is month
|
||||
call bin2bcd ; convert to month
|
||||
|
||||
xchg ax,dx ; DL, DH = day, month of date
|
||||
; AX = binary year
|
||||
|
||||
mov bl,100
|
||||
div bl ; AL = century, AH = year
|
||||
xchg al,ah ; AH = century, AL = year
|
||||
call bin2bcd ; convert AL, AH from binary to BCD
|
||||
xchg ax,cx ; CL, CH = year, century for date
|
||||
|
||||
mov ah,5 ; set real time clock date
|
||||
int RTC_INT ; on AT, XT-286, PS/2, etc.
|
||||
|
||||
; Now we'll convert the time & set the RTC if present
|
||||
|
||||
; mov ah,es:HOURS[si]
|
||||
; mov al,es:MINUTES[si] ; get binary hours & minutes
|
||||
mov ax,es:word ptr MINUTES[si]
|
||||
call bin2bcd ; convert to BCD values
|
||||
xchg ax,cx ; CH, CL = hh:mm in BCD
|
||||
mov ah,es:SECONDS[si]
|
||||
mov al,0 ; get binary seconds & no daylight saving
|
||||
call bin2bcd ; convert to BCD values
|
||||
xchg ax,dx ; DH, DL = ss.000 in BCD
|
||||
|
||||
mov ah,3 ; set real time clock time
|
||||
int RTC_INT ; on AT, XT-286, PS/2, etc.
|
||||
|
||||
mov al,100
|
||||
mul es:SECONDS[si] ; AX = seconds in hundredths
|
||||
xchg ax,dx ; save in DX
|
||||
mov al,es:HUNDREDTHS[si]
|
||||
cbw ; AX = hundredths
|
||||
add ax,dx ; AX = secs and hundredths in 1/100ths
|
||||
cwd ; make the a dword
|
||||
mov bx,5
|
||||
div bx ; AX = secs and hundredths in 5/100ths
|
||||
xchg ax,bx ; save in BX
|
||||
mov al,60 ; convert hours into minutes
|
||||
mul es:HOURS[si] ; AX = hours in mins
|
||||
xchg ax,dx
|
||||
mov al,es:MINUTES[si]
|
||||
cbw ; AX = minutes value
|
||||
add ax,dx ; AX = hours and mins in mins
|
||||
mov dx,60*20
|
||||
mul dx ; DX:AX = hours and mins in 5/100ths
|
||||
add ax,bx
|
||||
adc dx,0 ; DX:AX = total in 5/100ths
|
||||
mov bx,CONVERSION_FACTOR ; load up our magic value
|
||||
push dx ; save high word
|
||||
mul bx ; DX = low word result
|
||||
mov cx,dx ; save for later
|
||||
pop ax ; recover high word
|
||||
mul bx ; DX:AX = result from high word
|
||||
add ax,cx ; add low and high word results
|
||||
adc dx,0 ; together in DX:AX
|
||||
xchg ax,dx ; DX = low word of result
|
||||
xchg ax,cx ; CX = high word of result
|
||||
|
||||
mov ah,1 ; set system timer
|
||||
int RTC_INT ; CX = high word, DX = low word
|
||||
|
||||
sub ax,ax ; return successfully when done
|
||||
ret
|
||||
|
||||
|
||||
Public read_system_ticks
|
||||
|
||||
read_system_ticks:
|
||||
;-----------------
|
||||
mov ah,0 ; read system tick counter
|
||||
int RTC_INT
|
||||
test al,al ; have we passed midnight ?
|
||||
jz read_st10 ; if so a new day has dawned
|
||||
inc daycount
|
||||
read_st10:
|
||||
ret
|
||||
|
||||
bin2bcd: ; convert AL and AH to BCD values
|
||||
;-------
|
||||
call bin2bcd1 ; swap AL, AH, convert to BCD
|
||||
; call bin2bcd1
|
||||
; ret
|
||||
bin2bcd1:
|
||||
push cx
|
||||
mov ch,ah ; save AH in scratch register
|
||||
aam ; AL = AL % 10; AH = AL/10;
|
||||
mov cl,4
|
||||
shl ah,cl ; shift tens into high nibble
|
||||
or ah,al ; combine the nibbles
|
||||
mov al,ch ; restore the high byte into low byte
|
||||
pop cx
|
||||
ret
|
||||
|
||||
driver endp
|
||||
|
||||
RCODE ends ; end of device driver code
|
||||
|
||||
RESUMECODE segment 'RESUMECODE'
|
||||
|
||||
; If the system ROM BIOS supports RESUME mode then it will call Int 6C
|
||||
; when returning from sleep mode. We take this over and reset the clock
|
||||
; based upon the RTC value. To save space we only relocate the code if
|
||||
; required.
|
||||
;
|
||||
|
||||
Public ResumeHandler
|
||||
ResumeHandler proc far
|
||||
sti
|
||||
mov ax,cs:DataSegment ; we have been asleep and are being
|
||||
mov ds,ax ; woken by the BIOS
|
||||
mov es,ax ; lets re-read the RTC before
|
||||
call set_clock ; we return to them
|
||||
clc
|
||||
ret 2
|
||||
ResumeHandler endp
|
||||
|
||||
set_monlen db 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
|
||||
|
||||
|
||||
set_clock:
|
||||
;---------
|
||||
; We may also be called after a RESUME when we have to reset the time.
|
||||
|
||||
mov ah,2 ; read real time clock
|
||||
xor cx,cx
|
||||
xor dx,dx ; assume it won't work
|
||||
stc
|
||||
int RTC_INT ; CH = hours, CL = mins, DH = secs
|
||||
jc set_clock40 ; (all in BCD remember)
|
||||
|
||||
xchg al,dh ; AL = secs
|
||||
call bcd2bin ; AL = secs in binary
|
||||
cmp al,59
|
||||
ja set_clock40 ; reject invalid seconds
|
||||
mov ah,100
|
||||
mul ah ; AX = seconds in hundredths
|
||||
cwd ; make it a dword
|
||||
mov bx,5
|
||||
div bx ; AX = secs and hundredths in 5/100ths
|
||||
xchg ax,bx ; save in BX
|
||||
|
||||
mov al,ch ; AL = hours in BCD
|
||||
call bcd2bin ; AL = hours in binary
|
||||
cmp al,23
|
||||
ja set_clock40 ; reject invalid hours
|
||||
mov ah,60 ; convert hours into minutes
|
||||
mul ah ; AX = hours in mins
|
||||
xchg ax,dx ; save in DX
|
||||
|
||||
mov al,cl ; AL = mins in BCD
|
||||
call bcd2bin ; AL = mins in binary
|
||||
cmp al,59
|
||||
je set_clock40 ; reject invalid mins
|
||||
cbw ; AX = minutes value
|
||||
add ax,dx ; AX = hours and mins in mins
|
||||
mov dx,60*20
|
||||
mul dx ; DX:AX = hours and mins in 5/100ths
|
||||
add ax,bx
|
||||
adc dx,0 ; DX:AX = total in 5/100ths
|
||||
mov bx,CONVERSION_FACTOR ; load up our magic value
|
||||
push dx ; save high word
|
||||
mul bx ; DX = low word result
|
||||
mov cx,dx ; save for later
|
||||
pop ax ; recover high word
|
||||
mul bx ; DX:AX = result from high word
|
||||
add ax,cx ; add low and high word results
|
||||
adc dx,0 ; together in DX:AX
|
||||
xchg ax,dx ; DX = low word of result
|
||||
xchg ax,cx ; CX = high word of result
|
||||
|
||||
mov ah,1 ; set system timer
|
||||
int RTC_INT ; CX = high word, DX = low word
|
||||
|
||||
set_clock40:
|
||||
mov ah,4 ; read RTC (if present)
|
||||
int RTC_INT ; validate date - CMOS may be corrupt
|
||||
cmp cx,1980h ; Too low?
|
||||
jb set_clock45 ; Yes so skip
|
||||
cmp cx,2099h ; Too high ?
|
||||
ja set_clock45 ; Yes so skip
|
||||
cmp dx,0101h ; Too low?
|
||||
jb set_clock45 ; Yes so skip
|
||||
cmp dx,3112h ; Too high ?
|
||||
jbe set_clock50 ; No its okay so scram
|
||||
set_clock45:
|
||||
mov cx,1980h ; assume the year 1980
|
||||
mov dx,0101h ; assume 1st of January of that year
|
||||
set_clock50:
|
||||
xchg ax,cx ; AL, AH = year, century in BCD
|
||||
call bcd2bin ; convert values to binary
|
||||
xchg ax,cx
|
||||
xchg ax,dx ; AL, AH = day, month in BCD
|
||||
call bcd2bin ; convert values to binary
|
||||
xchg ax,dx
|
||||
|
||||
mov daycount,0 ; zero the daycount in case of RESUME
|
||||
mov ax,19*256 + 80 ; assume 1980
|
||||
set_clock55:
|
||||
cmp ax,cx ; same year?
|
||||
je set_clock65
|
||||
mov bx,365 ; assume 365 days in that year
|
||||
test al,3 ; test for leap year
|
||||
jnz set_clock60 ; (this works til 2400 A.D.)
|
||||
inc bx ; add FEB 29 if divisible by four
|
||||
set_clock60:
|
||||
add daycount,bx ; add days in previous year to total
|
||||
inc al ; next year
|
||||
cmp al,100 ; end of century?
|
||||
jb set_clock55 ; skip if same century
|
||||
mov al,0 ; continue with XX00
|
||||
inc ah ; ...next century
|
||||
jmps set_clock55 ; check year again
|
||||
|
||||
|
||||
set_clock65: ; same year by now
|
||||
xchg ax,cx ; CX = year
|
||||
sub dx,0101h ; make month, day 0 relative
|
||||
sub bx,bx ; assume January
|
||||
sub ax,ax ; AH = 0
|
||||
set_clock70:
|
||||
cmp dh,bl ; does current month match?
|
||||
je set_clock80 ; skip if it does
|
||||
mov al,cs:set_monlen[bx] ; get length of that month
|
||||
cmp al,28 ; is it february ?
|
||||
jne set_clock75
|
||||
test cl,3 ; is it a leap year ?
|
||||
jnz set_clock75
|
||||
inc ax ; leap year, 29 days in february
|
||||
set_clock75:
|
||||
add daycount,ax ; add it to total day count
|
||||
inc bx ; move on to next month
|
||||
jmps set_clock70
|
||||
|
||||
set_clock80:
|
||||
mov al,dl ; get days in that month
|
||||
add daycount,ax ; add them to day count
|
||||
ret
|
||||
|
||||
bcd2bin:
|
||||
;-------
|
||||
; entry: AL, AH = BCD values
|
||||
; AL, AH = binary equivalents
|
||||
|
||||
call bcd2bin1 ; swap AL, AH, convert AL to binary
|
||||
; call bcd2bin1 ; swap AL, AH, convert AL to binary
|
||||
; ret
|
||||
|
||||
bcd2bin1: ; convert BCD to binary
|
||||
xchg al,ah ; swap the two values
|
||||
push bx
|
||||
mov bl,0 ; start off without tens
|
||||
bcd2bin2:
|
||||
cmp al,10h ; check if more tens
|
||||
jb bcd2bin3 ; all tens done
|
||||
sub al,10h ; else subtract 10 in BCD
|
||||
add bl,10 ; ...and add it in binary
|
||||
jmps bcd2bin2 ; repeat for all tens
|
||||
bcd2bin3: ; AL = ones, BL = tens
|
||||
add al,bl ; AL = binary value
|
||||
pop bx ; restore BX
|
||||
ret
|
||||
|
||||
|
||||
RESUMECODE ends
|
||||
|
||||
|
||||
ICODE segment 'ICODE' ; initialization code
|
||||
|
||||
Assume CS:CGROUP, DS:CGROUP
|
||||
|
||||
dd_init: ; 0-initialize driver
|
||||
;-------
|
||||
call set_clock ; set elapsed ticks
|
||||
|
||||
les bx,REQUEST[bp] ; ES:BX -> request header
|
||||
|
||||
mov ax,endbios
|
||||
mov es:RH0_RESIDENT[bx],ax ; set end of device driver
|
||||
mov es:RH0_RESIDENT+2[bx],ds
|
||||
|
||||
sub ax,ax ; initialization succeeded
|
||||
ret ; (BIOS init always does...)
|
||||
|
||||
|
||||
ICODE ends
|
||||
|
||||
end
|
||||
1404
IBMBIO/CONFIG.A86
Normal file
1404
IBMBIO/CONFIG.A86
Normal file
File diff suppressed because it is too large
Load Diff
124
IBMBIO/CONFIG.EQU
Normal file
124
IBMBIO/CONFIG.EQU
Normal file
@@ -0,0 +1,124 @@
|
||||
; File : $CONFIG.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
|
||||
DOS5 equ 0FFFFh
|
||||
|
||||
if DOS5
|
||||
MOVE_DOWN equ 1800h ; start relocated code 96K down
|
||||
else
|
||||
MOVE_DOWN equ 2500h ; start relocated code 148K down
|
||||
endif
|
||||
|
||||
NUM_BUFFS equ 4
|
||||
SIZEOF_BUFFS equ 1024+32 ; allow for large sectors during init
|
||||
|
||||
CONFIG_BUF equ ds:byte ptr .0
|
||||
CONFIG_BUF_SIZE equ 8*1024 ; CONFIG.SYS read in this size chunks
|
||||
INIT_BUFFERS equ CONFIG_BUF+CONFIG_BUF_SIZE
|
||||
if DOS5
|
||||
INIT_BUFFERS_SIZE equ NUM_BUFFS*SIZEOF_BUFFS
|
||||
; reserve space for init disk buffers
|
||||
TEMP_LDT equ INIT_BUFFERS+INIT_BUFFERS_SIZE
|
||||
; space for temp LDT's at CONFIG time
|
||||
TEMP_LDT_SIZE equ ((26*58h)/16)*16+20h
|
||||
else
|
||||
INIT_BUFFERS_SIZE equ NUM_BUFFS*(512+16) ; reserve space for init disk buffers
|
||||
TEMP_LDT equ INIT_BUFFERS+INIT_BUFFERS_SIZE
|
||||
; space for temp LDT's at CONFIG time
|
||||
TEMP_LDT_SIZE equ ((26*51h)/16)*16+20h
|
||||
endif
|
||||
DYNAMIC_DATA_END equ TEMP_LDT+TEMP_LDT_SIZE
|
||||
|
||||
BLKDEV_LENGTH equ 9 ; # of bytes per block device init entry
|
||||
|
||||
MAX_PATHLEN equ 65 ; Maximum Path Length
|
||||
MAX_FILELEN equ 80 ; Maximum File Length
|
||||
EOF equ 01ah ; End of File Marker
|
||||
|
||||
MIN_NUM_BUFFS equ 3 ; minimum # of disk buffers required
|
||||
MAX_NUM_BUFFS equ 99 ; maximum # of disk buffers supported
|
||||
DEF_NUM_BUFFS equ 1 ; 1 during config to so most go hi
|
||||
|
||||
MIN_READ_AHEAD equ 1 ; minimum read-ahead
|
||||
MAX_READ_AHEAD equ 99 ; maximum read-ahead
|
||||
DEF_READ_AHEAD equ 0 ; default no read-ahead
|
||||
;
|
||||
; DEF_NUM_FILES must be less than MIN_NUM_FILES in order to
|
||||
; force two file structure allocations Windows will FAIL if this
|
||||
; is not TRUE.
|
||||
;
|
||||
MIN_NUM_FILES equ 8 ; minimum # of files required
|
||||
MAX_NUM_FILES equ 255 ; maximum # of files supported
|
||||
DEF_NUM_FILES equ 1 ; default # of files (+4 FCBS)
|
||||
|
||||
MIN_NUM_FCBS equ 0 ; minimum # of fcbs required
|
||||
MAX_NUM_FCBS equ 255 ; maximum # of fcbs supported
|
||||
DEF_NUM_FCBS equ 4 ; default # of fcb handles
|
||||
|
||||
MIN_NUM_FOPEN equ 0 ; minimum # of hashed files required
|
||||
MAX_NUM_FOPEN equ 32768 ; maximum # of hashed files supported
|
||||
DEF_NUM_FOPEN equ 4096 ; default # of files on normal system
|
||||
|
||||
MIN_NUM_STACKS equ 8 ; on hardware interrupts swap stacks
|
||||
MAX_NUM_STACKS equ 64 ; to a dynamically allocated one
|
||||
DEF_NUM_STACKS equ 0 ; zero is a special case - no swapping
|
||||
|
||||
MIN_SIZE_STACK equ 32 ; the dynamic stacks are this size
|
||||
MAX_SIZE_STACK equ 512
|
||||
DEF_SIZE_STACK equ 128 ; default size
|
||||
|
||||
CFG_BUF_LEN equ 256 ; Length of CONFIG.SYS line buffer
|
||||
|
||||
DEF_COUNTRY equ 1 ; USA
|
||||
DEF_CODEPAGE equ 0 ; No codepage
|
||||
|
||||
DELWATCH equ 0FFFFh
|
||||
|
||||
RLF_ENHANCED equ 0000$0001b ; Enhanced features are on
|
||||
RLF_INS equ 0000$0010b ; Insert Flag
|
||||
RLF_SEARCH equ 0000$0100b ; Search mode on
|
||||
RLF_MATCH equ 0000$1000b ; We are matching a command
|
||||
|
||||
BUFFERS_IN_HMA equ 0000$0001b
|
||||
BUFFERS_IN_UMB equ 0000$0010b
|
||||
|
||||
DMD_ID equ es:byte ptr .0 ; id code ('M' or 'Z')
|
||||
DMD_PSP equ es:word ptr .1 ; owner of memory block
|
||||
DMD_LEN equ es:word ptr .3 ; length of memory block
|
||||
DMD_NAME equ es:byte ptr .8 ; ASCIIZ name field
|
||||
DMD_NAME_LEN equ 8 ; 8 Bytes long
|
||||
IDM equ 'M' ; not last id code
|
||||
IDZ equ 'Z' ; last id code
|
||||
|
||||
45
IBMBIO/CONFSTUB.A86
Normal file
45
IBMBIO/CONFSTUB.A86
Normal file
@@ -0,0 +1,45 @@
|
||||
; File : $CONFSTUB.A86$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
CGROUP group INITCODE
|
||||
INITCODE CSEG PARA 'INITCODE'
|
||||
|
||||
Public config_process
|
||||
config_process: ; Process CONFIG.SYS
|
||||
ret
|
||||
|
||||
Public country_error
|
||||
country_error:
|
||||
ret
|
||||
end
|
||||
307
IBMBIO/CONSOLE.ASM
Normal file
307
IBMBIO/CONSOLE.ASM
Normal file
@@ -0,0 +1,307 @@
|
||||
; File : $Workfile$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; CONSOLE.ASM 1.8 93/07/22 19:43:16
|
||||
; switch over to REQUEST.EQU
|
||||
; CONSOLE.ASM 1.7 93/07/19 18:57:15
|
||||
; Add header
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
include BIOSGRPS.EQU
|
||||
include DRMACROS.EQU ; standard DR macros
|
||||
include IBMROS.EQU ; ROM BIOS equates
|
||||
include REQUEST.EQU ; request header equates
|
||||
include DRIVER.EQU ; device driver equates
|
||||
|
||||
page
|
||||
CGROUP group CODE, RCODE, ICODE
|
||||
|
||||
CG equ offset CGROUP
|
||||
|
||||
Assume CS:CGROUP, DS:CGROUP, ES:CGROUP, SS:CGROUP
|
||||
|
||||
CODE segment 'CODE'
|
||||
|
||||
INSERT_ACTIVE equ 2 ; set if cmdline insert active
|
||||
|
||||
extrn endbios:word ; for device driver INIT function
|
||||
extrn FastConsole:far ; console output vector
|
||||
extrn ControlBreak:far ; ^C program abort
|
||||
extrn local_flag:byte
|
||||
extrn local_char:byte
|
||||
|
||||
CODE ends
|
||||
|
||||
RCODE segment 'RCODE'
|
||||
|
||||
; Device driver function table
|
||||
|
||||
Public ConsoleTable
|
||||
|
||||
ConsoleTable:
|
||||
db 14 ; Last supported command
|
||||
dw CG:dd_init ; 0-initialize driver
|
||||
dw CG:dd_error ; 1-media change check (disks only)
|
||||
dw CG:dd_error ; 2-build BPB (disks only)
|
||||
dw CG:dd_inioctl ; 3-IOCTL string input
|
||||
dw CG:dd_input ; 4-input
|
||||
dw CG:dd_poll ; 5-nondestructive input (char only)
|
||||
dw CG:dd_instat ; 6-input status (char only)
|
||||
dw CG:dd_inflush ; 7-input flush
|
||||
dw CG:dd_output ; 8-output
|
||||
dw CG:dd_output ; 9-output with verify
|
||||
dw CG:dd_outstat ; 10-output status (char only)
|
||||
dw CG:dd_outflush ; 11-output flush (char only)
|
||||
dw CG:dd_outioctl ; 12-IOCTL string output
|
||||
dw CG:dd_open ; 13-device open
|
||||
dw CG:dd_close ; 14-device close
|
||||
|
||||
|
||||
Assume DS:CGROUP, ES:Nothing, SS:Nothing
|
||||
|
||||
page
|
||||
driver proc near
|
||||
|
||||
dd_outioctl:
|
||||
;-----------
|
||||
mov cx,es:RH4_COUNT[bx] ; get # of characters to output
|
||||
cmp cx,2 ; is it what we expect ?
|
||||
jne dd_error ; no, bail out
|
||||
push ds
|
||||
lds si,es:RH4_BUFFER[bx] ; DS:SI -> buffer
|
||||
lodsw ; get the data
|
||||
pop ds
|
||||
xchg ax,si ; save data in SI
|
||||
mov ah,3 ; read cursor position/type
|
||||
mov bh,0 ; for page zero
|
||||
int VIDEO_INT
|
||||
and ch,0c0h ; make cursor start line = 0
|
||||
mov al,cl ; AL = bottom line of cursor
|
||||
dec ax ; AL = bottom line - 1
|
||||
test si,INSERT_ACTIVE
|
||||
jz dd_outioctl10
|
||||
shr al,1 ; Insert active is 1/2 size block
|
||||
dd_outioctl10:
|
||||
or ch,al ; cursor start line is now here
|
||||
mov ah,1 ; set cursor type
|
||||
int VIDEO_INT
|
||||
ret
|
||||
|
||||
dd_inioctl:
|
||||
;----------
|
||||
; jmp dd_error ; input not supported
|
||||
|
||||
dd_error: ; used for all unsupported driver functions
|
||||
;--------
|
||||
mov ax,RHS_ERROR+3 ; "invalid command" error
|
||||
ret
|
||||
|
||||
|
||||
poll_c1:
|
||||
mov ah,0 ; eat the next character
|
||||
int KEYBOARD_INT ; take it out of ROS buffer
|
||||
; and check again
|
||||
poll_char:
|
||||
;---------
|
||||
; exit: ZF = 1 => no character ready
|
||||
; ZF = 0 => AL = character
|
||||
|
||||
mov al,local_char ; get the local character
|
||||
cmp local_flag,TRUE ; do we have local character?
|
||||
je poll_c4 ; no, check ROS keyboard status
|
||||
mov ah,1 ; get keyboard status (and character)
|
||||
int KEYBOARD_INT ; read character from keyboard
|
||||
jz input9 ; skip if no character there
|
||||
test ax,ax ; test if we got Ctrl-Brk
|
||||
jz poll_c1 ; and eat it if we have
|
||||
poll_c3: ; we've got a character
|
||||
cmp ax,7200h ; is this Ctrl-PrtSc?
|
||||
jne poll_c4
|
||||
mov al,'P'-40h ; convert to ^P character
|
||||
poll_c4: ; return the character in AL
|
||||
or ah,TRUE ; indicate "ready" status
|
||||
ret
|
||||
|
||||
char_read:
|
||||
;---------
|
||||
cmp local_flag,TRUE ; do we have local character?
|
||||
je rdchr3 ; handle that specially
|
||||
mov ah,0
|
||||
int KEYBOARD_INT ; read character from keyboard
|
||||
test ax,ax ; test if we got Ctrl-Brk
|
||||
jz char_read ; retry in that case
|
||||
cmp ax,7200h ; is this Ctrl-PrtSc?
|
||||
jne rdchr1 ; skip if any other
|
||||
mov al,'P'-40h ; convert to ^P character
|
||||
ret ; and return it
|
||||
rdchr1: ; else it is normal or function key
|
||||
test al,al ; test if function key
|
||||
jnz rdchr2 ; skip if normal character
|
||||
mov local_flag,TRUE ; else return scan code as next
|
||||
mov local_char,ah ; character from next INPUT
|
||||
rdchr2: ; return the character in AL
|
||||
ret
|
||||
rdchr3:
|
||||
mov local_flag,FALSE ; tell them buffer is invalid
|
||||
mov al,local_char ; get the local charcater
|
||||
ret ; and return it
|
||||
|
||||
page
|
||||
dd_input: ; 4-input
|
||||
;--------
|
||||
mov cx,es:RH4_COUNT[bx] ; get # of characters to output
|
||||
jcxz input9 ; return if nothing to input
|
||||
push es ; save ES (-> request header!)
|
||||
les di,es:RH4_BUFFER[bx] ; get address of string to input
|
||||
input1:
|
||||
call char_read ; read 8-bit character
|
||||
stosb ; store it in input buffer
|
||||
loop input1 ; repeat for all characters
|
||||
pop es
|
||||
input9:
|
||||
; sub ax,ax
|
||||
; ret
|
||||
|
||||
dd_outstat: ; 10-output status (char only)
|
||||
;---------- ; always ready, return no busy
|
||||
|
||||
dd_outflush: ; 11-output flush (char only)
|
||||
;----------- ; unbuffered, perform no operation
|
||||
|
||||
dd_open: ; 13-device open
|
||||
;------- ; no operation
|
||||
|
||||
dd_close: ; 14-device close
|
||||
;-------- ; no operation
|
||||
sub ax,ax
|
||||
ret
|
||||
|
||||
dd_poll: ; 5-nondestructive input (char only)
|
||||
;-------
|
||||
call poll_char ; check keyboard status
|
||||
jz dd_instat20
|
||||
mov es:RH5_CHAR[bx],al ; return the character
|
||||
dd_poll10:
|
||||
sub ax,ax
|
||||
ret
|
||||
|
||||
dd_instat: ; 6-input status (char only)
|
||||
;---------
|
||||
call poll_char ; check keyboard status
|
||||
jnz dd_poll10
|
||||
dd_instat20:
|
||||
mov ax,RHS_BUSY
|
||||
ret
|
||||
|
||||
|
||||
dd_inflush: ; 7-input flush
|
||||
;---------
|
||||
call poll_char ; check keyboard status
|
||||
jz dd_poll10 ; skip if not ready
|
||||
call char_read ; else read next character
|
||||
jmps dd_inflush ; repeat until buffer empty
|
||||
|
||||
dd_output: ; 8-output
|
||||
;---------
|
||||
mov cx,es:RH4_COUNT[bx] ; get # of characters to output
|
||||
jcxz output9 ; return if nothing to output
|
||||
push es ; save ES (-> request header!)
|
||||
les si,es:RH4_BUFFER[bx] ; get address of string to output
|
||||
output1:
|
||||
lods es:byte ptr [si] ; get next character to output
|
||||
pushf ; stack as per Int 29
|
||||
db 09Ah ; CALLF to our fastconsole entry
|
||||
dw CG:FastConsole
|
||||
dw 70h
|
||||
loop output1 ; repeat for all characters
|
||||
pop es
|
||||
output9:
|
||||
sub ax,ax
|
||||
ret
|
||||
|
||||
|
||||
driver endp
|
||||
|
||||
RCODE ends ; end of device driver code
|
||||
|
||||
page
|
||||
|
||||
ICODE segment 'ICODE' ; initialization code
|
||||
|
||||
dd_init: ; 0-initialize driver
|
||||
;-------
|
||||
|
||||
push es
|
||||
sub ax,ax
|
||||
mov es,ax
|
||||
mov ax,CG:FastConsole ; console output vector
|
||||
mov di,FASTCON_INT*4 ; setup fast single character
|
||||
stosw ; console output vector
|
||||
mov ax,ds ; (identified by DA_SPECIAL)
|
||||
stosw
|
||||
mov di,CTRLBRK_INT*4 ; setup Ctrl-Break ROS vector
|
||||
mov ax,CG:ControlBreak ; for ^C program abort
|
||||
stosw ; when a character has already
|
||||
mov ax,ds ; been typed into the ROS buffer
|
||||
stosw
|
||||
pop es
|
||||
|
||||
ifdef JAPAN
|
||||
|
||||
mov ax,05000H ; Japanese mode (AX machine)
|
||||
mov bx,81 ; 081 : Japanese mode select
|
||||
int VIDEO_INT ;
|
||||
|
||||
mov ax,05000h ; Japanese mode (AX machine)
|
||||
mov bx,81 ; 081 : Japanese mode select
|
||||
int KEYBOARD_INT ;
|
||||
|
||||
endif
|
||||
|
||||
mov ax,14*256 + 13 ; output a carriage return
|
||||
int VIDEO_INT
|
||||
mov ax,14*256 + 10 ; output a line feed
|
||||
int VIDEO_INT
|
||||
|
||||
les bx,REQUEST[bp] ; ES:BX -> request header
|
||||
|
||||
mov ax,endbios ; get last resident byte in BIOS
|
||||
mov es:RH0_RESIDENT[bx],ax ; set end of device driver
|
||||
mov es:RH0_RESIDENT+2[bx],ds
|
||||
|
||||
sub ax,ax ; initialization succeeded
|
||||
ret
|
||||
|
||||
ICODE ends
|
||||
|
||||
end
|
||||
73
IBMBIO/COUNTRY.DEF
Normal file
73
IBMBIO/COUNTRY.DEF
Normal file
@@ -0,0 +1,73 @@
|
||||
; File : $COUNTRY.DEF$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
US_DATE equ 0 ; American Date Format mm/dd/yy
|
||||
EURO_DATE equ 1 ; European Date Format dd/mm/yy
|
||||
JAP_DATE equ 2 ; Japanese Date Format yy/mm/dd
|
||||
|
||||
CLOCK_12 equ 0 ; 12 Hour Clock Time Format
|
||||
CLOCK_24 equ 1 ; 24 Hour Clock Time Format
|
||||
|
||||
CI_CODE equ word ptr 0FFFCh ; Country Code
|
||||
CI_CODEPAGE equ word ptr 0FFFEh ; Code page
|
||||
CI_DATEFMT equ word ptr 0 ; Date Format
|
||||
CI_CURRENCY equ byte ptr 2 ; Currency Symbols
|
||||
CI_THOUSANDS equ byte ptr 7 ; Thousands Separator
|
||||
CI_DECIMAL equ byte ptr 9 ; Decimal Separator
|
||||
CI_DATESEP equ byte ptr 11 ; Date Separator
|
||||
CI_TIMESEP equ byte ptr 13 ; Time Separator
|
||||
CI_CURFMT equ byte ptr 15 ; Currency Format
|
||||
CI_CURDIGITS equ byte ptr 16 ; Significant Currency Digits
|
||||
CI_TIMEFMT equ byte ptr 17 ; Time Format
|
||||
CI_CASEOFF equ word ptr 18 ; Case Translation Offset
|
||||
CI_CASESEG equ word ptr 20 ; Case Translation Segment
|
||||
CI_DATASEP equ byte ptr 22 ; Data List Separator
|
||||
CI_STATICLEN equ 24 ; Static Country Data Length
|
||||
CI_LENGTH equ 32 ; Total Country Data Length
|
||||
|
||||
EXI_ID equ byte ptr 0 ; Information ID
|
||||
EXI_TBLOFF equ word ptr 1 ; Table Offset
|
||||
EXI_TBLSEG equ word ptr 3 ; Table Segment
|
||||
|
||||
EXI_ID1 equ byte ptr 0 ; 6501 Info ID (why move it?!)
|
||||
EXI_LENGTH equ word ptr 1 ; 6501 Table Length
|
||||
EXI_DATA_LEN equ 3 ; 6501 Country Data
|
||||
|
||||
EXCI_CUR_COUNTRY equ word ptr 0 ; Current Country
|
||||
EXCI_CUR_CP equ word ptr 2 ; Current Codepage
|
||||
EXCI_CI_DATAOFF equ 4 ; Start of CI_ data
|
||||
|
||||
EXCI_STATLEN equ CI_STATICLEN+4 ; Static Ext Country Info
|
||||
EXCI_MAXLEN equ EXCI_STATLEN+10+EXI_DATA_LEN ; Max Ext Country Info
|
||||
|
||||
2618
IBMBIO/DISK.ASM
Normal file
2618
IBMBIO/DISK.ASM
Normal file
File diff suppressed because it is too large
Load Diff
123
IBMBIO/DOSHNDL.DEF
Normal file
123
IBMBIO/DOSHNDL.DEF
Normal file
@@ -0,0 +1,123 @@
|
||||
; File : $DOSHNDL.DEF$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
|
||||
DCNTRL_DSADD equ dword ptr 0000h
|
||||
DCNTRL_DSOFF equ word ptr 0000h
|
||||
DCNTRL_DSSEG equ word ptr 0002h
|
||||
DCNTRL_COUNT equ word ptr 0004h
|
||||
DCNTRL_LEN equ 6
|
||||
|
||||
DHNDL_COUNT equ word ptr 00h ; 00 - Usage Count
|
||||
DHNDL_MODE equ word ptr 02h ; 02 - File Mode
|
||||
|
||||
DHM_FCB equ 8000h ; marks as FCB
|
||||
DHM_COMMIT equ 4000h ; auto-commit file
|
||||
DHM_NOCRIT equ 2000h ; no critical errors
|
||||
DHM_LOCAL equ 10000000b ; file is not inherited
|
||||
DHM_SHAREMSK equ 01110000b ; sharing bits
|
||||
DHM_COMPAT equ 00000000b
|
||||
DHM_DENY_ALL equ 00010000b ; exclusive - deny all
|
||||
DHM_DENY_WRITE equ 00100000b
|
||||
DHM_DENY_READ equ 00110000b
|
||||
DHM_DENY_NONE equ 01000000b
|
||||
DHM_RWMSK equ 00001111b ; read write bits
|
||||
DHM_RW equ 00000010b ; file opened read/write
|
||||
DHM_WO equ 00000001b ; file opened write only
|
||||
DHM_RO equ 00000000b ; file opened read only
|
||||
|
||||
;
|
||||
; 01h to 03h To be Determined
|
||||
;
|
||||
DHNDL_DATRB equ byte ptr 04h ; Disk attribute byte
|
||||
DHNDL_ATTR equ byte ptr 05h ; Attribute Byte
|
||||
DHNDL_WATTR equ word ptr 05h ; Attribute Word
|
||||
|
||||
DHAT_REMOTE equ 8000h ; set if file remote
|
||||
DHAT_TIMEOK equ 4000h ; set if timestamp up to date
|
||||
DHAT_LOCAL equ 1000h ; file is not inherited
|
||||
DHAT_NETPRN equ 0800h ; device is networked printer
|
||||
DHAT_DEV equ 0080h ; device/file bit
|
||||
DHAT_READY equ 0040h ; ready/not ready bit
|
||||
DHAT_CLEAN equ 0040h ; this bit CLEAR if dirty
|
||||
DHAT_BIN equ 0020h ; raw/cooked bit
|
||||
DHAT_DRVMSK equ 001Fh ; drive in bottom bits
|
||||
DHAT_CLK equ 0008h ; -reserved-
|
||||
DHAT_NUL equ 0004h ; handle is null device
|
||||
DHAT_COT equ 0002h ; handle is console output device
|
||||
DHAT_CIN equ 0001h ; handle is console input device
|
||||
|
||||
DHNDL_DEVPTR equ dword ptr 07h ; 07 - pointer to device
|
||||
DHNDL_DEVOFF equ word ptr 07h ; 07 - offset of device
|
||||
DHNDL_DEVSEG equ word ptr 09h ; 09 - segment of device
|
||||
DHNDL_BLK1 equ word ptr 0Bh ; 0B - first cluster in file
|
||||
DHNDL_TIME equ word ptr 0Dh ; 0D - file time stamp
|
||||
DHNDL_DATE equ word ptr 0Fh ; 0F - file date stamp
|
||||
DHNDL_SIZE equ dword ptr 11h ; 11 - file length
|
||||
DHNDL_SIZELO equ word ptr 11h
|
||||
DHNDL_SIZEHI equ word ptr 13h
|
||||
DHNDL_POS equ dword ptr 15h ; 15 - current file position
|
||||
DHNDL_POSLO equ word ptr 15h
|
||||
DHNDL_POSHI equ word ptr 17h
|
||||
DHNDL_IDX equ word ptr 19h ; 19 - relative cluster within file of last read
|
||||
DHNDL_DBLK equ word ptr 1Bh ; 1B - cluster # of dir entry
|
||||
DHNDL_DCNTHI equ byte ptr 1Eh ; 1E - dir offset # within cluster
|
||||
DHNDL_DCNTLO equ byte ptr 1Fh ; 1F - dir offset # within cluster
|
||||
DHNDL_NAME equ byte ptr 20h ; 20 - File/Device Name
|
||||
DHNDL_EXT equ byte ptr 28h ; 28 - File extension
|
||||
DHNDL_SFT equ dword ptr 2Bh ; 2B - pointer to previous SFT
|
||||
DHNDL_UID equ word ptr 2Fh ; 2F - Owning Machine ID
|
||||
DHNDL_PSP equ word ptr 31h ; 31 - Owning PSP
|
||||
DHNDL_SHARE equ word ptr 33h ; 33 - Offset of sharing record
|
||||
DHNDL_BLK equ word ptr 35h ; 35 - absolute cluster of last read
|
||||
; 37 - dword reserved for IFS
|
||||
DHNDL_LEN equ 3Bh
|
||||
|
||||
; With DOS 3 structures _DBLK is a 16 bit
|
||||
|
||||
|
||||
; Logical Drive Table format
|
||||
LDT_NAME equ byte ptr 00h ; 00 - Ascii Name field
|
||||
LDT_FLAGS equ word ptr 43h ; 43 - Flag field
|
||||
LDT_PDT equ dword ptr 45h ; 45 - PDT for this drive
|
||||
LDT_BLK equ word ptr 49h ; 49 - directory sector
|
||||
LDT_ROOT equ word ptr 4bh ; 4B - virtual block root
|
||||
LDT_DRV equ byte ptr 4dh ; 4D - physical drive
|
||||
LDT_ROOTLEN equ word ptr 4fh ; 4F - Length of root portion
|
||||
LDT_LEN equ 58h
|
||||
|
||||
LFLG_NETWRKD equ 8000h
|
||||
LFLG_PHYSICAL equ 4000h
|
||||
LFLG_JOINED equ 2000h
|
||||
LFLG_SUBST equ 1000h
|
||||
59
IBMBIO/DRIVER.EQU
Normal file
59
IBMBIO/DRIVER.EQU
Normal file
@@ -0,0 +1,59 @@
|
||||
; File : $DRIVER.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
; ENDLOG
|
||||
; Device driver header offsets.
|
||||
|
||||
|
||||
DH_NEXT equ es:dword ptr 0 ; Dword Pointer to Next DEV
|
||||
DH_NEXTOFF equ es:word ptr 0 ; Offset of next device
|
||||
DH_NEXTSEG equ es:word ptr 2 ; Segment of next device
|
||||
DH_ATTRIB equ es:word ptr 4 ; device attribute bits
|
||||
DH_STRATEGY equ es:word ptr 6 ; offset of strategy entry
|
||||
DH_INTERRUPT equ es:word ptr 8 ; offset of interupt entry
|
||||
DH_NAME equ es:byte ptr 10 ; 8-BYTE device name
|
||||
|
||||
DA_CHARDEV equ 8000h ; 1=character device, 0=block device
|
||||
DA_IOCTL equ 4000h ; device supports IOCTL string I/O
|
||||
DA_NONIBM equ 2000h ; dosen't require FAT for login
|
||||
DA_OTILBSY equ 2000h ; supports "output until busy"
|
||||
DA_REMOVE equ 0800h ; supports "removable media" check
|
||||
DA_QUERY equ 0080h ; supports query ioctl
|
||||
DA_GETSET equ 0040h ; supports 3.2 level functionality
|
||||
DA_SPECIAL equ 0010h ; fast console ouput via INT 29h
|
||||
DA_ISCLK equ 0008h ; device is current clock device
|
||||
DA_ISNUL equ 0004h ; device is NUL device (reserved)
|
||||
DA_BIGDRV equ 0002h ; supports > 65535 sector per drive
|
||||
DA_ISCOT equ 0002h ; device is standard output device
|
||||
DA_ISCIN equ 0001h ; device is standard input device
|
||||
|
||||
FASTCON_INT equ 29h ; fast console output interrupt
|
||||
|
||||
85
IBMBIO/DRMACROS.EQU
Normal file
85
IBMBIO/DRMACROS.EQU
Normal file
@@ -0,0 +1,85 @@
|
||||
; File : $DRMACROS.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
; 09-Nov-88 made RETF conditional for MASM 5.1/TASM 1.0
|
||||
|
||||
FALSE equ 0
|
||||
TRUE equ (not FALSE)
|
||||
|
||||
ifndef @filename ;; Turbo Assembler always knows RETF
|
||||
;; some versions of MASM do as well
|
||||
retf macro ;; define far return macro for others
|
||||
db 0cbh
|
||||
endm
|
||||
endif
|
||||
|
||||
jmps macro l
|
||||
jmp short l
|
||||
endm
|
||||
|
||||
pushx macro regs
|
||||
irp r,<regs>
|
||||
push r
|
||||
endm
|
||||
endm
|
||||
|
||||
popx macro regs
|
||||
irp r,<regs>
|
||||
pop r
|
||||
endm
|
||||
endm
|
||||
|
||||
incx macro regs
|
||||
irp r,<regs>
|
||||
inc r
|
||||
endm
|
||||
endm
|
||||
|
||||
decx macro regs
|
||||
irp r,<regs>
|
||||
dec r
|
||||
endm
|
||||
endm
|
||||
|
||||
rb macro count
|
||||
db count dup (?)
|
||||
endm
|
||||
|
||||
rw macro count
|
||||
dw count dup (?)
|
||||
endm
|
||||
|
||||
rd macro count
|
||||
dd count dup (?)
|
||||
endm
|
||||
|
||||
88
IBMBIO/F52DATA.DEF
Normal file
88
IBMBIO/F52DATA.DEF
Normal file
@@ -0,0 +1,88 @@
|
||||
; File : $F52DATA.DEF$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
; The following equates define the Data Area whose address is
|
||||
; returned by function 52.
|
||||
;
|
||||
|
||||
F52_BCBBUF equ es:dword ptr -0008h[bx] ; current buffer
|
||||
F52_BCBOFF equ es:word ptr -0008h[bx] ; current buffer
|
||||
F52_BCBSEG equ es:word ptr -0006h[bx] ; current buffer
|
||||
F52_DMDROOT equ es:word ptr -0002h[bx] ; Memory Descriptor Root (Seg)
|
||||
F52_DDSCPTR equ es:dword ptr 0000h[bx] ; DDSC Table Address
|
||||
F52_FILEPTR equ es:dword ptr 0004h[bx] ; File Handle Table Address
|
||||
F52_CLKDEV equ es:dword ptr 0008h[bx] ; Clock Device Header
|
||||
F52_CONDEV equ es:dword ptr 000Ch[bx] ; Console Device Header
|
||||
F52_SECSIZE equ es:word ptr 0010h[bx] ; Maximum Sector Size
|
||||
F52_BUFINFOPTR equ es:dword ptr 0012h[bx] ; Buffer Info pointer
|
||||
F52_PATHPTR equ es:dword ptr 0016h[bx] ; Path Control Table Address
|
||||
F52_PATHOFF equ es:word ptr 0016h[bx]
|
||||
F52_PATHSEG equ es:word ptr 0018h[bx]
|
||||
F52_FCBPTR equ es:dword ptr 001Ah[bx] ; FCB Table Address
|
||||
; equ es:word ptr 001Eh[bx] ; #Entries in FCB Table
|
||||
F52_PHYDRV equ es:byte ptr 0020h[bx] ; Last Physical Drive
|
||||
F52_LASTDRV equ es:byte ptr 0021h[bx] ; Last Logical Drive
|
||||
F52_DEVROOT equ es:dword ptr 0022h[bx] ; Root Device Header
|
||||
F52_JOINDRV equ es:byte ptr 0034h[bx] ; Number of JOIN'd drives
|
||||
F52_SETVER equ es:dword ptr 0037h[bx] ; SETVER table pointer
|
||||
F52_NUM_BUF equ es:word ptr 003Fh[bx] ; number of disk buffers
|
||||
F52_READ_AHEAD equ es:word ptr 0041h[bx] ; size of read-ahead buffer
|
||||
F52_BOOTDRV equ es:byte ptr 0043h[bx] ; boot drive (1-26)
|
||||
F52_CPU_TYPE equ es:byte ptr 0044h[bx] ; 01 if >= 386SX
|
||||
F52_EXT_MEM equ es:word ptr 0045h[bx] ; Int 15h, AH=87h
|
||||
F52_BUF_INFO equ es:dword ptr 0047h[bx] ; points at Buffer Info
|
||||
F52_HMAFLAG equ es:byte ptr 0053h[bx] ; 1 if buffers in HMA
|
||||
F52_DEBLOCK equ es:word ptr 0056h[bx] ; deblock if buffers in HMA
|
||||
F52_DMD_UPPER equ es:word ptr 0066h[bx] ; upper memory chain
|
||||
F52_SHARE_STUB equ es:dword ptr 006Ah[bx] ; Share Stub Entries*15
|
||||
|
||||
;DRDOS Specific
|
||||
|
||||
DRDOS_CRITSTUBS equ es:word ptr 0000h[bx] ; Offset of end of instance data
|
||||
DRDOS_HIST1CTL equ es:word ptr 0004h[bx] ; History 1 Control
|
||||
DRDOS_HIST2CTL equ es:word ptr 0006h[bx] ; History 2 Control
|
||||
DRDOS_HISTFLG equ es:byte ptr 0008h[bx] ; History Buffer Flag
|
||||
DRDOS_DUAL_LANG equ es:byte ptr 0009h[bx] ; Utils Dual Language Support
|
||||
DRDOS_CUR_LANG equ es:byte ptr 000Ah[bx] ; Current Language
|
||||
DRDOS_EXT_MEM equ es:word ptr 000Bh[bx] ; Total Extended Memory
|
||||
DRDOS_HIMEM_ROOT equ es:word ptr 0010h[bx] ; High memory chain
|
||||
DRDOS_ENVSEG equ es:word ptr 0012h[bx] ; Seg of environment
|
||||
DRDOS_DMD_BASE equ es:word ptr 0016h[bx] ; base memory freed at
|
||||
DRDOS_DMD_UPPER equ es:word ptr 0018h[bx] ; upper memory chain
|
||||
DRDOS_MACHINE_ID equ es:word ptr 001Ah[bx] ; local machine ID
|
||||
DRDOS_COUNTRY_FILE equ es:word ptr 001Eh[bx] ; offset of filename
|
||||
DRDOS_HASHOFF equ es:word ptr 0020h[bx] ; fastopen hash root
|
||||
DRDOS_HASHSEG equ es:word ptr 0022h[bx] ; pointer
|
||||
DRDOS_HASHMAX equ es:word ptr 0024h[bx] ; max # dir entries
|
||||
DRDOS_DEBLOCK equ es:word ptr 0026h[bx] ; himem deblock buffer
|
||||
DRDOS_INT2F equ es:word ptr 002Ch[bx] ; internal Int 2F hook
|
||||
220
IBMBIO/FDOS.EQU
Normal file
220
IBMBIO/FDOS.EQU
Normal file
@@ -0,0 +1,220 @@
|
||||
; File : $FDOS.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
; Structure of Buffer Control Blocks
|
||||
; ----------------------------------
|
||||
; These BCBs immediately preceed the data buffers. BCBs are
|
||||
; always shared for all drives and therefore must be big
|
||||
; enough for the largest drive.
|
||||
;
|
||||
|
||||
BCB_NEXT equ word ptr 00h ; link to next buffer
|
||||
BCB_PREV equ word ptr 02h ; link to previous buffer
|
||||
BCB_DRV equ byte ptr 04h ; drive of this buffer or 0FFh
|
||||
BCB_FLAGS equ byte ptr 05h ; buffer flags
|
||||
BCB_REC equ word ptr 06h ; low 16 bits of sector address
|
||||
BCB_REC2 equ byte ptr 08h ; top 8 bits of record address
|
||||
BCB_COPIES equ byte ptr 0Ah ; number of copies to write
|
||||
BCB_SEPARATION equ word ptr 0Bh ; # sectors copies are apart
|
||||
BCB_DDSC equ dword ptr 0Dh ; DWORD ptr to DDSC_
|
||||
BCB_REMOTE equ word ptr 11h ; remote in-use count
|
||||
BCB_DATA equ byte ptr 14h ; buffer data
|
||||
|
||||
BF_ISFAT equ 0002h ; buffer marked as FAT sector
|
||||
BF_ISDIR equ 0004h ; buffer marked as Directory sector
|
||||
BF_ISDAT equ 0008h ; buffer marked as Data sector
|
||||
BF_DIRTY equ 0040h ; buffer marked as modified
|
||||
BF_REMOTE equ 0080h ; buffer is remote
|
||||
|
||||
MAX12 equ 0FF6h ; max. disk size w/ 12-bit media
|
||||
|
||||
; Structure of Hash Control Block
|
||||
; -------------------------------
|
||||
; Each hash control block refers to the hash codes of one
|
||||
; disrectory cluster or a root directory.
|
||||
|
||||
HCB_LINK equ word ptr 0 ; link to next control block
|
||||
HCB_DRV equ byte ptr 2 ; drive for this entry or 0FFh
|
||||
HCB_CLU equ word ptr 4 ; cluster number or 0000 if root
|
||||
HCB_CNT equ word ptr 6 ; number of hashed entries
|
||||
HCB_DATA equ word ptr 8 ; hash buffer data
|
||||
|
||||
|
||||
; Structure of DOS FCB
|
||||
; --------------------
|
||||
|
||||
MSF_EXTFLG equ byte ptr 0 ; if this is 0xFF, skip 1st 7 byte
|
||||
MSF_ATTRIB equ byte ptr 6 ; file attributes if MSF_EXTFLG
|
||||
MSF_DRIVE equ byte ptr 0 ; 1st byte normally drive code
|
||||
MSF_NAME equ byte ptr 1 ; 8-bit ASCII file name, 11 characters
|
||||
MSF_BLOCK equ word ptr 12 ; current block number
|
||||
MSF_RECSIZE equ word ptr 14 ; current logical record size
|
||||
MSF_SIZE equ word ptr 16 ; 32-bit file size
|
||||
MSF_DATE equ word ptr 20 ; last date stamp
|
||||
MSF_TIME equ word ptr 22 ; last time stamp
|
||||
MSF_IFN equ byte ptr 24 ;; internal file number
|
||||
MSF_IOCTL equ byte ptr 25 ;; file status
|
||||
MSF_BLOCK1 equ word ptr 26 ;; 1st block of file
|
||||
MSF_DBLK equ word ptr 28 ;; directory block
|
||||
MSF_DEVPTR equ dword ptr 28 ;; address of device driver
|
||||
MSF_DCNT equ word ptr 30 ;; directory count
|
||||
MSF_CR equ byte ptr 32 ; current sequential record
|
||||
MSF_RR equ word ptr 33 ; random record address (3 or 4 byte)
|
||||
MSF_RR2 equ byte ptr 35 ; random record overflow
|
||||
|
||||
|
||||
; Structure of DOS DPB
|
||||
; --------------------
|
||||
|
||||
DDSC_UNIT equ byte ptr 0 ; absolute drive number
|
||||
DDSC_RUNIT equ byte ptr 1 ; relative unit number
|
||||
DDSC_SECSIZE equ word ptr 2 ; sector size in bytes
|
||||
DDSC_CLMSK equ byte ptr 4 ; sectors/cluster - 1
|
||||
DDSC_CLSHF equ byte ptr 5 ; log2 (sectors/cluster)
|
||||
DDSC_FATADDR equ word ptr 6 ; sector address of FAT
|
||||
DDSC_NFATS equ byte ptr 8 ; # of FAT copies
|
||||
DDSC_DIRENT equ word ptr 9 ; size of root directory
|
||||
DDSC_DATADDR equ word ptr 11 ; sector address of cluster #2
|
||||
DDSC_NCLSTRS equ word ptr 13 ; # of clusters on disk
|
||||
DDSC_NFATRECS equ word ptr 15 ; # of sectors per FAT
|
||||
DDSC_DIRADDR equ word ptr 17 ; sector address of root dir
|
||||
DDSC_DEVHEAD equ dword ptr 19 ; device driver header
|
||||
DDSC_DEVOFF equ word ptr 19
|
||||
DDSC_DEVSEG equ word ptr 21
|
||||
DDSC_MEDIA equ byte ptr 23 ; current media byte
|
||||
DDSC_FIRST equ byte ptr 24 ; "drive never accessed" flag
|
||||
DDSC_LINK equ dword ptr 25 ; next drive's DDSC
|
||||
DDSC_BLOCK equ word ptr 29 ; next block to allocate
|
||||
DDSC_FREE equ word ptr 31 ; total free clusters on drive
|
||||
DDSC_LEN equ 33
|
||||
|
||||
|
||||
|
||||
; DELWATCH hooks called by OS
|
||||
|
||||
DELW_RDMASK equ 0 ; delete dir search mask
|
||||
DELW_DELETE equ 2 ; delete this dir entry
|
||||
DELW_FREECLU equ 3 ; free some clusters
|
||||
DELW_FREERD equ 4 ; free root dir entry
|
||||
DELW_SPACE equ 5 ; add "deletes" to free space
|
||||
DELW_NEWDISK equ 7 ; new disk logged in
|
||||
DELW_PURGE equ 14 ; perge pd file
|
||||
DELW_UNDEL equ 15 ; undelete pd file
|
||||
|
||||
; SuperStore hook called by OS
|
||||
|
||||
SSTOR_SPACE equ 10h ; enquire # physical free space
|
||||
|
||||
; Password hooks called by OS
|
||||
|
||||
PASSWD_CREAT equ 20h ; initialise an entry
|
||||
PASSWD_CHMOD equ 21h ; change an entry
|
||||
PASSWD_CHECK equ 22h ; check an entry
|
||||
|
||||
; Share hooks in PCMODE data segment
|
||||
;
|
||||
; These point to a stub which does a "STC, RETF"
|
||||
;
|
||||
|
||||
NUM_SHARE_STUB_ENTRIES equ 15
|
||||
|
||||
S_LOCKS equ DWORD*0 ; share lock/unlock region
|
||||
S_UPDATE equ DWORD*1 ; update DHNDL from share
|
||||
S_RECORD equ DWORD*2 ; update share from DHNDL
|
||||
S_FDOSRW equ DWORD*3 ; validate proposed operation
|
||||
S_DISCARD equ DWORD*4 ; discard all files on drive
|
||||
S_OPEN equ DWORD*5 ; files is opening, remember it
|
||||
S_CLOSE equ DWORD*6 ; files is closing, forget it
|
||||
S_OM_COMPAT equ DWORD*7 ; check open mode compatible
|
||||
S_CLOSE_IF_OPEN equ DWORD*8 ; close if compat open, else deny
|
||||
S_DENY_IF_OPEN equ DWORD*9 ; deny if open shared/by others
|
||||
S_GET_LIST_ENTRY equ DWORD*10 ; get open file list entry
|
||||
S_CLOSE_FILES equ DWORD*11 ; close all files for given PSP/UID
|
||||
|
||||
; struct dirfcb
|
||||
|
||||
DNAME equ byte ptr 0 ;file name & type
|
||||
DATTS equ byte ptr 11
|
||||
DA_RO equ 01h ; 0x01 - read/only
|
||||
DA_HIDDEN equ 02h ; 0x02 - hidden
|
||||
DA_SYSTEM equ 04h ; 0x04 - system
|
||||
DA_VOLUME equ 08h ; 0x08 - volume label
|
||||
DA_DIR equ 10h ; 0x10 - sub-directory
|
||||
DA_ARCHIVE equ 20h ; 0x20 - archive
|
||||
DA_CLUSTER equ 80h ; 0x80 - return starting cluster from search (API extention)
|
||||
DA_DELWATCH equ 80h ; 0x88 - return pending delete files
|
||||
DA_FIXED equ 11011000b ; can't CHMOD label, dir, unused bits
|
||||
DA_CHANGE equ not DA_FIXED ; all others are changeable
|
||||
|
||||
;DATTS2 equ 12 ;CP/M attributes
|
||||
; ; 0x80 - f1' modify default open rules
|
||||
; ; 0x40 - f2' partial close default
|
||||
; ; 0x20 - f3' ignore close checksum errors
|
||||
; ; 0x10 - f4' disable checksums
|
||||
; ; 0x08 - (reserved)
|
||||
; ; 0x04 - DELETE password
|
||||
; ; 0x02 - WRITE password
|
||||
; ; 0x01 - READ password
|
||||
DUNDEL equ 13 ;1st letter of deleted file
|
||||
DPWD equ word ptr 14 ;16-bit password hash code
|
||||
DMODTIME equ word ptr 16 ;delwatch time (hhhhhmmmmmmsssss)
|
||||
DMODDATE equ word ptr 18 ;delwatch date (yyyyyyymmmmddddd)
|
||||
;DRECSIZE equ 16 ;FlexOS record size
|
||||
;DUSER equ 18 ;FlexOS user ID of creator
|
||||
;DGROUP equ 19 ;FlexOS group ID of creator
|
||||
DPWM equ word ptr 20 ;FlexOS access rights
|
||||
DTIME equ 22 ;time (hhhhhmmmmmmsssss)
|
||||
DDATE equ 24 ;date (yyyyyyymmmmddddd)
|
||||
DBLOCK1 equ 26 ;first block in file
|
||||
DSIZE equ 28 ;current file size
|
||||
|
||||
; DOS Media Password Definitions
|
||||
; ------------------------------
|
||||
|
||||
PWM_OWNER equ 000Fh ; PWD Owner mask
|
||||
PWM_GROUP equ 00F0h ; PWD Group mask
|
||||
PWM_WORLD equ 0F00h ; PWD World mask
|
||||
PWM_R equ 0888h ; PWD required for reading
|
||||
PWM_W equ 0444h ; PWD required for writing
|
||||
PWM_E equ 0222h ; PWD req'd for executing
|
||||
PWM_D equ 0111h ; PWD required for deleting
|
||||
PWM_ANY equ PWM_R+PWM_W+PWM_D ; PWD required for anything
|
||||
|
||||
|
||||
; literal constants
|
||||
|
||||
FAT12 equ 00fffh ; 12 bit fat
|
||||
FAT16 equ 0ffffh ; 16 bit fat
|
||||
|
||||
ENDDIR equ 0ffffh ;end of directory
|
||||
|
||||
3607
IBMBIO/GENERCFG.A86
Normal file
3607
IBMBIO/GENERCFG.A86
Normal file
File diff suppressed because it is too large
Load Diff
83
IBMBIO/IBMROS.EQU
Normal file
83
IBMBIO/IBMROS.EQU
Normal file
@@ -0,0 +1,83 @@
|
||||
; File : $IBMROS.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
VIDEO_INT equ 10h
|
||||
EQUIPMENT_INT equ 11h
|
||||
MEMORY_INT equ 12h
|
||||
DISK_INT equ 13h
|
||||
ASYNC_INT equ 14h
|
||||
SYSTEM_INT equ 15h
|
||||
KEYBOARD_INT equ 16h
|
||||
PRINTER_INT equ 17h
|
||||
RTC_INT equ 1Ah
|
||||
CTRLBRK_INT equ 1Bh
|
||||
|
||||
; Int 10 subfunctions
|
||||
|
||||
SET_CURSOR_TYPE equ 01h
|
||||
WRITE_CURSOR equ 02h ; Set cursor position
|
||||
READ_CURSOR equ 03h ; Read cursor position
|
||||
SCROLL_UP equ 06h ; Scroll active page up
|
||||
SCROLL_DOWN equ 07h ; Scroll active page down
|
||||
READ_CHAR equ 08h ; Read attribute/char at cur position
|
||||
WRITE_CHAR equ 09h ; Write attribute/char at cur position
|
||||
WRITE_TTY equ 0eh ; Write teletype at current position
|
||||
GET_STATE equ 0fh ; Return current video mode
|
||||
|
||||
; Int 13 subfunctions
|
||||
|
||||
ROS_RESET equ 00h ; reset disk system
|
||||
ROS_READ equ 02h ; read from disk
|
||||
ROS_WRITE equ 03h ; write to disk
|
||||
ROS_VERIFY equ 04h ; verify data on disk
|
||||
ROS_FORMAT equ 05h ; format track on disk
|
||||
ROS_PARAM equ 08h ; get drive parameters
|
||||
ROS_GETTYPE equ 15h ; get drive type
|
||||
ROS_DSKCHG equ 16h ; check disk change status
|
||||
ROS_SETTYPE equ 17h ; set disk type for format
|
||||
ROS_SETMEDIA equ 18h ; set media type for format
|
||||
|
||||
PRN_ERROR equ 00101001b ; printer error bits
|
||||
PRN_NOTBUSY equ 10000000b
|
||||
PRN_ACK equ 01000000b
|
||||
PRN_PAPER equ 00100000b
|
||||
PRN_SELECT equ 00010000b
|
||||
PRN_IOERR equ 00001000b
|
||||
PRN_TIMEOUT equ 00000001b
|
||||
|
||||
AUX_ERROR equ 10000000b ; auxiliary error bits
|
||||
|
||||
; Int 15 subfunctions
|
||||
|
||||
EXT_MEMORY equ 88h ; Return extended memory size in KB
|
||||
1080
IBMBIO/INIT.ASM
Normal file
1080
IBMBIO/INIT.ASM
Normal file
File diff suppressed because it is too large
Load Diff
82
IBMBIO/INITMSGS.ASM
Normal file
82
IBMBIO/INITMSGS.ASM
Normal file
@@ -0,0 +1,82 @@
|
||||
NUL equ 0
|
||||
BS equ 8
|
||||
TAB equ 9
|
||||
LF equ 10
|
||||
CR equ 13
|
||||
|
||||
CGROUP group INITDATA
|
||||
|
||||
INITDATA segment word public 'INITDATA'
|
||||
assume ds:CGROUP, cs:CGROUP
|
||||
|
||||
; Source .TFT file: 'TMP1.$$$'
|
||||
public _yes_char
|
||||
public yes_char
|
||||
yes_char label byte
|
||||
_yes_char db "Yy", NUL
|
||||
public _no_char
|
||||
public no_char
|
||||
no_char label byte
|
||||
_no_char db "Nn", NUL
|
||||
public _bad_command
|
||||
public bad_command
|
||||
bad_command label byte
|
||||
_bad_command db "Invalid command in CONFIG.SYS file.$", NUL
|
||||
public _bad_filename
|
||||
public bad_filename
|
||||
bad_filename label byte
|
||||
_bad_filename db "Bad or missing file $", NUL
|
||||
public _bad_shell
|
||||
public bad_shell
|
||||
bad_shell label byte
|
||||
_bad_shell db "Invalid SHELL filename $", NUL
|
||||
public _bad_lastdrive
|
||||
public bad_lastdrive
|
||||
bad_lastdrive label byte
|
||||
_bad_lastdrive db "Invalid last drive character (use A..Z) $", NUL
|
||||
public _bad_break
|
||||
public bad_break
|
||||
bad_break label byte
|
||||
_bad_break db "Invalid break switch (use ON or OFF)$", NUL
|
||||
public _bad_buffers
|
||||
public bad_buffers
|
||||
bad_buffers label byte
|
||||
_bad_buffers db "Invalid number of buffers $", NUL
|
||||
public _bad_files
|
||||
public bad_files
|
||||
bad_files label byte
|
||||
_bad_files db "Invalid number of files (use 5..255)", CR, LF, "$", NUL
|
||||
public _bad_fcbs
|
||||
public bad_fcbs
|
||||
bad_fcbs label byte
|
||||
_bad_fcbs db "Invalid number of FCBS", CR, LF, "$", NUL
|
||||
public _bad_fopen
|
||||
public bad_fopen
|
||||
bad_fopen label byte
|
||||
_bad_fopen db "Invalid number of FASTOPEN entries (use 128..32768)", CR, LF, "$", NUL
|
||||
public _bad_drivparm
|
||||
public bad_drivparm
|
||||
bad_drivparm label byte
|
||||
_bad_drivparm db "Invalid or missing DRIVPARM parameters, usage:", CR, LF, "DRIVPARM = /D:d [/C] [/F:f] [/H:h] [/N] [/S:s] [/T:t]", CR, LF, "$", NUL
|
||||
public _bad_history
|
||||
public bad_history
|
||||
bad_history label byte
|
||||
_bad_history db "Invalid HISTORY parameters, usage:", CR, LF, "HISTORY = ON|OFF [,nnn[, ON|OFF]]", CR, LF, "$", NUL
|
||||
public _bad_country
|
||||
public bad_country
|
||||
bad_country label byte
|
||||
_bad_country db "Invalid country code $", NUL
|
||||
public _bad_exec
|
||||
public bad_exec
|
||||
bad_exec label byte
|
||||
_bad_exec db "Bad or missing command interpreter.", CR, LF, "Please enter a valid filename.", CR, LF, "$", NUL
|
||||
public _dos_msg
|
||||
public dos_msg
|
||||
dos_msg label byte
|
||||
_dos_msg db CR, LF, "Can't load DOS file.$", NUL
|
||||
|
||||
INITDATA ends
|
||||
|
||||
|
||||
end
|
||||
|
||||
32
IBMBIO/INITMSGS.DEF
Normal file
32
IBMBIO/INITMSGS.DEF
Normal file
@@ -0,0 +1,32 @@
|
||||
extrn _bad_break : byte
|
||||
extrn bad_break : byte
|
||||
extrn _bad_buffers : byte
|
||||
extrn bad_buffers : byte
|
||||
extrn _bad_command : byte
|
||||
extrn bad_command : byte
|
||||
extrn _bad_country : byte
|
||||
extrn bad_country : byte
|
||||
extrn _bad_drivparm : byte
|
||||
extrn bad_drivparm : byte
|
||||
extrn _bad_exec : byte
|
||||
extrn bad_exec : byte
|
||||
extrn _bad_fcbs : byte
|
||||
extrn bad_fcbs : byte
|
||||
extrn _bad_filename : byte
|
||||
extrn bad_filename : byte
|
||||
extrn _bad_files : byte
|
||||
extrn bad_files : byte
|
||||
extrn _bad_fopen : byte
|
||||
extrn bad_fopen : byte
|
||||
extrn _bad_history : byte
|
||||
extrn bad_history : byte
|
||||
extrn _bad_lastdrive : byte
|
||||
extrn bad_lastdrive : byte
|
||||
extrn _bad_shell : byte
|
||||
extrn bad_shell : byte
|
||||
extrn _dos_msg : byte
|
||||
extrn dos_msg : byte
|
||||
extrn _no_char : byte
|
||||
extrn no_char : byte
|
||||
extrn _yes_char : byte
|
||||
extrn yes_char : byte
|
||||
16
IBMBIO/INITMSGS.H
Normal file
16
IBMBIO/INITMSGS.H
Normal file
@@ -0,0 +1,16 @@
|
||||
extern char near bad_break[];
|
||||
extern char near bad_buffers[];
|
||||
extern char near bad_command[];
|
||||
extern char near bad_country[];
|
||||
extern char near bad_drivparm[];
|
||||
extern char near bad_exec[];
|
||||
extern char near bad_fcbs[];
|
||||
extern char near bad_filename[];
|
||||
extern char near bad_files[];
|
||||
extern char near bad_fopen[];
|
||||
extern char near bad_history[];
|
||||
extern char near bad_lastdrive[];
|
||||
extern char near bad_shell[];
|
||||
extern char near dos_msg[];
|
||||
extern char near no_char[];
|
||||
extern char near yes_char[];
|
||||
119
IBMBIO/MAKE.BAT
Normal file
119
IBMBIO/MAKE.BAT
Normal file
@@ -0,0 +1,119 @@
|
||||
@ECHO off
|
||||
SET TOOLS=C:\TOOLS
|
||||
|
||||
SET MASM=%TOOLS%\MASM.EXE
|
||||
SET LINK=%TOOLS%\LINK.EXE
|
||||
SET LIBR=%TOOLS%\LIB.EXE
|
||||
|
||||
REM
|
||||
REM YOU SHOULD NOT HAVE TO CHANGE ANYTHING BELOW THIS LINE.
|
||||
REM
|
||||
|
||||
REM Define local Caldera tools
|
||||
SET LOCTOOLS=..\LTOOLS
|
||||
|
||||
IF NOT EXIST BIN\*.* MD BIN
|
||||
|
||||
REM Check if tools exist
|
||||
|
||||
ECHO Checking for %MASM%
|
||||
if not exist %MASM% goto badtool
|
||||
ECHO Checking for %LINK%
|
||||
if not exist %LINK% goto badtool
|
||||
ECHO Checking for %LIBR%
|
||||
if not exist %LIBR% goto badtool
|
||||
|
||||
|
||||
REM *************************************
|
||||
REM Build .ASM files first, get the obj's
|
||||
REM *************************************
|
||||
|
||||
%MASM% /t initmsgs,.\BIN\initmsgs;
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%MASM% /t biosmsgs,.\BIN\biosmsgs;
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%MASM% /t init,.\BIN\init;
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%MASM% /t clock,.\BIN\clock;
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%MASM% /t console,.\BIN\console;
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%MASM% /t disk,.\BIN\disk;
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%MASM% /t serpar,.\BIN\serpar;
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%MASM% /t biosgrps,.\BIN\biosgrps;
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%MASM% /t stacks,.\BIN\stacks;
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
|
||||
REM ******************************************
|
||||
REM Build the library so that we can link into
|
||||
REM ******************************************
|
||||
%LOCTOOLS%\rasm_sh %LOCTOOLS%\rasm86.exe . .\confstub.a86 .\BIN\confstub.obj $szpz /DDRDOS35=0 /DADDDRV=0
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\fixupp .\BIN\confstub.obj
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\rasm_sh %LOCTOOLS%\rasm86.exe . .\bdosstub.a86 .\BIN\bdosstub.obj $szpz /DDRDOS35=0 /DADDDRV=0
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\fixupp .\BIN\bdosstub.obj
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LIBR% .\BIN\biosstub.LIB -+ .\BIN\bdosstub.obj -+ .\BIN\confstub.obj;
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
|
||||
REM ******************************************
|
||||
REM Build the .A86 files next, get the obj's
|
||||
REM ******************************************
|
||||
%LOCTOOLS%\rasm_sh %LOCTOOLS%\rasm86.exe . .\biosinit.a86 .\BIN\biosinit.obj $szpz /DDRDOS35=0 /DADDDRV=0
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\fixupp .\BIN\biosinit.obj
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\rasm_sh %LOCTOOLS%\rasm86.exe . .\config.a86 .\BIN\config.obj $szpz /DDRDOS35=0 /DADDDRV=0
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\fixupp .\BIN\config.obj
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\rasm_sh %LOCTOOLS%\rasm86.exe . .\bdosldr.a86 .\BIN\bdosldr.obj $szpz /DDRDOS35=0 /DADDDRV=0
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\fixupp .\BIN\bdosldr.obj
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\rasm_sh %LOCTOOLS%\rasm86.exe . .\genercfg.a86 .\BIN\genercfg.obj $szpz /DDRDOS35=0 /DADDDRV=0
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\fixupp .\BIN\genercfg.obj
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\rasm_sh %LOCTOOLS%\rasm86.exe . .\nlsfunc.a86 .\BIN\nlsfunc.obj $szpz /DDRDOS35=0 /DADDDRV=0
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\fixupp .\BIN\nlsfunc.obj
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
|
||||
REM ***************************************************
|
||||
REM Link the OBJ's and LIBR file to create the BIOS.EXE
|
||||
REM and then use EXE2BIN to create the IBMBIO.COM file.
|
||||
REM ***************************************************
|
||||
%LINK% @bios.lnk
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
%LOCTOOLS%\exe2bin.exe .\bin\bios.exe .\bin\ibmbio.com
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
del .\bin\bios.exe
|
||||
%LOCTOOLS%\compbios .\bin\ibmbio.com
|
||||
IF ERRORLEVEL 1 GOTO FAILED
|
||||
goto exit
|
||||
|
||||
:failed
|
||||
ECHO Error in Build!
|
||||
goto exit
|
||||
|
||||
:badtool
|
||||
ECHO Can't find that tool!
|
||||
|
||||
:exit
|
||||
REM *********
|
||||
REM CLEANUP
|
||||
REM *********
|
||||
|
||||
SET TOOLS=
|
||||
SET LOCTOOLS=
|
||||
SET MASM=
|
||||
SET TASM=
|
||||
SET LINK=
|
||||
SET LIBR=
|
||||
|
||||
327
IBMBIO/MODFUNC.DEF
Normal file
327
IBMBIO/MODFUNC.DEF
Normal file
@@ -0,0 +1,327 @@
|
||||
; File : $Workfile: MODFUNC.DEF$
|
||||
;
|
||||
; Description : Standard VLADIVAR include file
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
;****************************************************************;
|
||||
;* *;
|
||||
;* OS386 Inter-Module Function Definitions *;
|
||||
;* *;
|
||||
;****************************************************************;
|
||||
|
||||
OS386_FUNC equ 2780h ; AX value
|
||||
OS386_INT equ 02Fh ; interrupt number
|
||||
|
||||
; Module definitions
|
||||
USER equ 0
|
||||
SUP equ 1
|
||||
RTM equ 2
|
||||
MEM equ 3
|
||||
DOM equ 4
|
||||
VM equ 5
|
||||
DPMI equ 6
|
||||
DPMS equ 7
|
||||
MIN_MODULE equ 5
|
||||
MAX_MODULE equ 15
|
||||
|
||||
; Internal SUP functions
|
||||
F_NotImp equ SUP + 0100h * 00 ; Function Not Implemented
|
||||
F_Illegal equ SUP + 0100h * 01 ; Illegal Function
|
||||
F_ModuleReg equ SUP + 0100h * 02 ; Register Module
|
||||
F_SysDatAlloc equ SUP + 0100h * 03 ; allocate SYSDAT memory
|
||||
F_SysDat equ SUP + 0100h * 04 ; return SYSDAT selector
|
||||
F_MoveReal equ SUP + 0100h * 05 ; move real mode memory to protected mode
|
||||
F_Reboot equ SUP + 0100h * 06
|
||||
F_Debug equ SUP + 0100h * 07
|
||||
F_ForeCheck equ SUP + 0100h * 08 ; Check for foreground
|
||||
F_RegisterVxD equ SUP + 0100h * 09 ; Register VxD with system
|
||||
F_UnloadVxD equ SUP + 0100h * 10 ; Unload VxD hook
|
||||
F_PostInit equ SUP + 0100h * 11 ; end of initialisation phase
|
||||
F_AllocWindow equ SUP + 0100h * 12 ; allocate a 4K mapping window
|
||||
F_RegisterBoot equ SUP + 0100h * 13 ; register reboot addresses
|
||||
F_EnquireBoot equ SUP + 0100h * 14 ; enquire if reboot active
|
||||
F_GetDebugLevel equ SUP + 0100h * 15 ; get debug level
|
||||
F_SetDebugLevel equ SUP + 0100h * 16 ; set debug level
|
||||
F_Version equ SUP + 0100h * 17 ; version check
|
||||
F_V86BPInstall equ SUP + 0100h * 18 ; install v86 break point
|
||||
F_V86BPRemove equ SUP + 0100h * 19 ; remove v86 break point
|
||||
F_V86BPOffer equ SUP + 0100h * 20 ; offer int 3 as v86 break point
|
||||
F_LoaderCleanup equ SUP + 0100h * 21 ; offer the chance to cleanup
|
||||
F_RegisterVxDWindow equ SUP + 0100h * 22 ; Register VxD mapping window
|
||||
F_RegisterPNW equ SUP + 0100h * 23 ; Register PNW info
|
||||
|
||||
; Internal RTM functions
|
||||
F_PDCount equ RTM + 0100h * 01
|
||||
F_FlgWait equ RTM + 0100h * 02
|
||||
F_FlgSet equ RTM + 0100h * 03
|
||||
F_QMake equ RTM + 0100h * 04
|
||||
F_QOpen equ RTM + 0100h * 05
|
||||
F_QDelete equ RTM + 0100h * 06
|
||||
F_QRead equ RTM + 0100h * 07
|
||||
F_CQread equ RTM + 0100h * 08
|
||||
F_QWrite equ RTM + 0100h * 09
|
||||
F_CQWrite equ RTM + 0100h * 10
|
||||
F_Delay equ RTM + 0100h * 11
|
||||
F_Dispatch equ RTM + 0100h * 12
|
||||
F_PTerm equ RTM + 0100h * 13
|
||||
F_PCreat equ RTM + 0100h * 14
|
||||
F_SetPrior equ RTM + 0100h * 15
|
||||
F_PDAddr equ RTM + 0100h * 16
|
||||
F_PAbort equ RTM + 0100h * 17
|
||||
F_Sleep equ RTM + 0100h * 18
|
||||
F_Wakeup equ RTM + 0100h * 19
|
||||
F_FindPDName equ RTM + 0100h * 20
|
||||
F_SetFlags equ RTM + 0100h * 21
|
||||
F_EndOfInterrupt equ RTM + 0100h * 22 ; Register PIC end of interrupt
|
||||
F_NoAbort equ RTM + 0100h * 23
|
||||
F_OkAbort equ RTM + 0100h * 24
|
||||
F_FlagStatus equ RTM + 0100h * 25
|
||||
F_QRdMX equ RTM + 0100h * 26
|
||||
F_QWrMX equ RTM + 0100h * 27
|
||||
F_FlgAlloc equ RTM + 0100h * 28
|
||||
F_FlgFree equ RTM + 0100h * 29
|
||||
F_NumFlags equ RTM + 0100h * 30
|
||||
F_NDQRead equ RTM + 0100h * 31
|
||||
F_FlgWWTO equ RTM + 0100h * 32
|
||||
F_UdaAlloc equ RTM + 0100h * 33
|
||||
F_UdaFree equ RTM + 0100h * 34
|
||||
F_PFreeze equ RTM + 0100h * 35
|
||||
F_PThaw equ RTM + 0100h * 36
|
||||
F_CritEnter equ RTM + 0100h * 37
|
||||
F_CritExit equ RTM + 0100h * 38
|
||||
F_PCreate equ RTM + 0100h * 39
|
||||
F_PDList equ RTM + 0100h * 40
|
||||
F_PDToName equ RTM + 0100h * 41
|
||||
F_PDToStatus equ RTM + 0100h * 42
|
||||
F_PDToDomain equ RTM + 0100h * 43
|
||||
F_GetPrior equ RTM + 0100h * 44
|
||||
F_QDList equ RTM + 0100h * 45
|
||||
F_QDToName equ RTM + 0100h * 46
|
||||
F_QDToMsgLen equ RTM + 0100h * 47
|
||||
F_QDToMaxMsgs equ RTM + 0100h * 48
|
||||
F_QDToNqPD equ RTM + 0100h * 49
|
||||
F_QDToDqPD equ RTM + 0100h * 50
|
||||
F_QDToNumMsgs equ RTM + 0100h * 51
|
||||
F_QDToFlags equ RTM + 0100h * 52
|
||||
F_NameToQD equ RTM + 0100h * 53
|
||||
F_NameToPD equ RTM + 0100h * 54
|
||||
F_MutexAlloc equ RTM + 0100h * 55
|
||||
F_MutexFree equ RTM + 0100h * 56
|
||||
F_MutexEnter equ RTM + 0100h * 57
|
||||
F_MutexCEnter equ RTM + 0100h * 58
|
||||
F_MutexExit equ RTM + 0100h * 59
|
||||
F_Slice equ RTM + 0100h * 60
|
||||
F_TickLength equ RTM + 0100h * 61
|
||||
F_ProcessID equ RTM + 0100h * 62
|
||||
F_QClose equ RTM + 0100h * 63
|
||||
F_QDispose equ RTM + 0100h * 64
|
||||
F_PDToFlags equ RTM + 0100h * 65
|
||||
F_PDToDParam equ RTM + 0100h * 66
|
||||
F_ReleaseMX equ RTM + 0100h * 67
|
||||
F_SimulateInt equ RTM + 0100h * 68
|
||||
F_SetQFlags equ RTM + 0100h * 69
|
||||
F_TickRate equ RTM + 0100h * 70
|
||||
|
||||
; Internal MEMORY functions
|
||||
F_PdirGet equ MEM + 0100h * 01
|
||||
F_PdirSet equ MEM + 0100h * 02
|
||||
F_PageAlloc equ MEM + 0100h * 03
|
||||
F_RealAllocG equ MEM + 0100h * 04
|
||||
F_RealAllocI equ MEM + 0100h * 05
|
||||
F_PtblRead equ MEM + 0100h * 06
|
||||
F_PtblWrite equ MEM + 0100h * 07
|
||||
F_PageGet equ MEM + 0100h * 08
|
||||
F_PageSet equ MEM + 0100h * 09
|
||||
F_PagesAlloc equ MEM + 0100h * 10
|
||||
F_PageFree equ MEM + 0100h * 11
|
||||
F_MemAlloc equ MEM + 0100h * 12
|
||||
F_MemFree equ MEM + 0100h * 13
|
||||
F_MemSize equ MEM + 0100h * 14
|
||||
F_MemResize equ MEM + 0100h * 15
|
||||
F_DescAlloc equ MEM + 0100h * 16
|
||||
F_DescFree equ MEM + 0100h * 17
|
||||
F_DescGet equ MEM + 0100h * 18
|
||||
F_DescSet equ MEM + 0100h * 19
|
||||
F_DescMemAlloc equ MEM + 0100h * 20
|
||||
F_DescMemFree equ MEM + 0100h * 21
|
||||
F_DescMemSize equ MEM + 0100h * 22
|
||||
F_DescMemResize equ MEM + 0100h * 23
|
||||
F_PageLock equ MEM + 0100h * 24
|
||||
F_PageUnlock equ MEM + 0100h * 25
|
||||
F_PageLockAny equ MEM + 0100h * 26
|
||||
F_PageUnlockReuse equ MEM + 0100h * 27
|
||||
F_PageLockNone equ MEM + 0100h * 28
|
||||
F_PageUnlockNone equ MEM + 0100h * 29
|
||||
F_CallRealRaw equ MEM + 0100h * 30 ; Call real mode (SS:ESP supplied)
|
||||
F_IntRealRaw equ MEM + 0100h * 31 ; Do real mode interrupt (SS:ESP supplied)
|
||||
F_CallReal equ MEM + 0100h * 32 ; Call real mode with RETF frame
|
||||
F_IntReal equ MEM + 0100h * 33 ; Do real mode interrupt
|
||||
F_PagedCallReal equ MEM + 0100h * 34 ; Paged real mode call
|
||||
F_PagedIntReal equ MEM + 0100h * 35 ; Paged real mode interrupt
|
||||
F_CallIretReal equ MEM + 0100h * 36 ; Call real mode with IRET frame
|
||||
F_CallIretRealRaw equ MEM + 0100h * 37 ; Call real mode with IRET frame (SS:ESP supplied)
|
||||
F_CallProt16 equ MEM + 0100h * 38 ; Call protected mode 16 bit code
|
||||
F_CallProt32 equ MEM + 0100h * 39 ; Call protected mode 32 bit code
|
||||
F_IAddPage equ MEM + 0100h * 40 ; add kernel instance data
|
||||
F_BankPageLock equ MEM + 0100h * 41
|
||||
F_BankPageUnlock equ MEM + 0100h * 42
|
||||
F_BankPageLockAny equ MEM + 0100h * 43
|
||||
F_BankPageUnlockReuse equ MEM+0100h * 44
|
||||
F_BankPageLockNone equ MEM + 0100h * 45
|
||||
F_BankPageUnlockNone equ MEM+ 0100h * 46
|
||||
F_GateAlloc equ MEM + 0100h * 47
|
||||
F_GateFree equ MEM + 0100h * 48
|
||||
F_MemTotalFree equ MEM + 0100h * 49
|
||||
F_AddressSpace equ MEM + 0100h * 50
|
||||
F_MemTotal equ MEM + 0100h * 51
|
||||
F_DescRead equ MEM + 0100h * 52
|
||||
F_DescWrite equ MEM + 0100h * 53
|
||||
F_GetStack equ MEM + 0100h * 54
|
||||
F_SetStack equ MEM + 0100h * 55
|
||||
|
||||
; Internal DOMain functions
|
||||
|
||||
F_DAlloc equ DOM + 0100h * 00 ; create a new domain
|
||||
F_DFree equ DOM + 0100h * 01 ; free up a domain
|
||||
F_DGet equ DOM + 0100h * 02 ; get current domain
|
||||
F_DSet equ DOM + 0100h * 03 ; switch to another domain
|
||||
F_SWIntHandler equ DOM + 0100h * 04 ; Install Software Interrupt handler
|
||||
F_PFaultHandler equ DOM + 0100h * 05 ; Install Page Fault handler
|
||||
F_IOExHandler equ DOM + 0100h * 06 ; Install I/O Exception handler
|
||||
F_GenExHandler equ DOM + 0100h * 07 ; Install General Exception handler
|
||||
F_HWIntHandler equ DOM + 0100h * 08 ; Install HW int handler
|
||||
F_IOBitGet equ DOM + 0100h * 09 ; Get domain IO bitmap
|
||||
F_IOBitSet equ DOM + 0100h * 10 ; Set domain IO bitmap
|
||||
F_BankIOBitGet equ DOM + 0100h * 11 ; Get domain banked IO bitmap
|
||||
F_BankIOBitSet equ DOM + 0100h * 12 ; Set domain banked IO bitmap
|
||||
F_BankMemGet equ DOM + 0100h * 13 ; Read domain banked memory
|
||||
F_BankMemSet equ DOM + 0100h * 14 ; Write domain banked memory
|
||||
F_BankPageGet equ DOM + 0100h * 15 ; Get domain banked page table entry
|
||||
F_BankPageSet equ DOM + 0100h * 16 ; Set domain banked page table entry
|
||||
F_RegInstData equ DOM + 0100h * 17 ; register DOS instance data
|
||||
F_NProcesses equ DOM + 0100h * 18 ; Get number of processes in domain
|
||||
F_DFreeze equ DOM + 0100h * 19 ; Suspend domain
|
||||
F_DThaw equ DOM + 0100h * 20 ; Unsuspend domain
|
||||
F_DFork equ DOM + 0100h * 21 ; Fork domain
|
||||
F_DAbort equ DOM + 0100h * 22 ; Abort all processes in domain
|
||||
F_UnlinkHandler equ DOM + 0100h * 23 ; Uninstall a handler
|
||||
F_HWIntDfltHandler equ DOM + 0100h * 24 ; Install HW int default handler
|
||||
F_VHWIntHandler equ DOM + 0100h * 25 ; Install Virtual HW int handler
|
||||
F_VHWIntDfltHandler equ DOM + 0100h * 26 ; Install Virtual HW int default handler
|
||||
F_SwapInHandler equ DOM + 0100h * 27 ; Install process swap in handler
|
||||
F_SwapOutHandler equ DOM + 0100h * 28 ; Install process swap out handler
|
||||
F_DosStartup equ DOM + 0100h * 29 ; Statup a DOS session
|
||||
F_DosShutdown equ DOM + 0100h * 30 ; Terminate a DOS session
|
||||
F_PCreateHandler equ DOM + 0100h * 31 ; Install process create handler
|
||||
F_PDeleteHandler equ DOM + 0100h * 32 ; Install process terminate handler
|
||||
F_RootPD equ DOM + 0100h * 33 ; Get Domain Root Process
|
||||
F_DForeground equ DOM + 0100h * 34 ; Domain has just switched to foreground
|
||||
F_DBackground equ DOM + 0100h * 35 ; Domain will be switching to background
|
||||
F_MapHMA equ DOM + 0100h * 36 ; Map Domains HMA
|
||||
F_AddInstData equ DOM + 0100h * 37 ; add DOS instance data
|
||||
F_DMemFree equ DOM + 0100h * 38 ; get memory available to this domain
|
||||
F_DMemTotal equ DOM + 0100h * 39 ; get memory allocated to this domain
|
||||
F_DGetMemLimit equ DOM + 0100h * 40 ; get limit on local memory allocations
|
||||
F_DSetMemLimit equ DOM + 0100h * 41 ; set limit on local memory allocations
|
||||
F_ReflectInt21 equ DOM + 0100h * 42 ; support for protected mode Int 21's
|
||||
F_DTestRegion equ DOM + 0100h * 43 ; test region for global/local memory
|
||||
F_Switcher equ DOM + 0100h * 44 ; make task switcher call
|
||||
F_HandlerCleanup equ DOM + 0100h * 45 ; debugger hook - remove all handlers for a selector
|
||||
F_DFlagGet equ DOM + 0100h * 46 ; get Domain Flags
|
||||
F_DFlagSet equ DOM + 0100h * 47 ; set Domain Flags
|
||||
F_DSwitchHandler equ DOM + 0100h * 48 ; Install domain switch handler
|
||||
F_GIOExHandler equ DOM + 0100h * 49 ; Install Global I/O Exception handler
|
||||
|
||||
;------------
|
||||
|
||||
; VM Functions
|
||||
|
||||
F_VMProtInit equ VM + 0100h * 00 ; Protected Mode initialisation internal)
|
||||
|
||||
F_LoadMT equ VM + 0100h * 01 ; Load MultiTasking
|
||||
F_UnloadMT equ VM + 0100h * 02 ; Unload MultiTasking
|
||||
F_ConsoleFree equ VM + 0100h * 03 ; Save Console if enabled, then free it
|
||||
F_ConsoleGet equ VM + 0100h * 04 ; Get Console, then restore if enabled
|
||||
F_ConsoleSaveEnable equ VM +0100h * 05 ; Enable Console save/restore
|
||||
F_ConsoleSaveDisable equ VM +0100h * 06 ; Disable Console save/restore
|
||||
|
||||
F_TMInit equ VM + 0100h * 07 ; Task Manager Init
|
||||
F_GetKey equ VM + 0100h * 08 ; Domain Manager to Keyboard Handler
|
||||
F_KeyScanEnable equ VM + 0100h * 09 ; Enable hotkey scanning
|
||||
F_KeyScanDisable equ VM + 0100h * 10 ; Disable hotkey scanning
|
||||
F_ConsoleOwner equ VM + 0100h * 11 ; Get console owner domain id
|
||||
F_DMAHandlerEnable equ VM + 0100h * 12 ; Re-enable DMA address translation
|
||||
F_DMAHandlerDisable equ VM + 0100h * 13 ; Disable DMA address translation
|
||||
F_SetSerialTimeout equ VM + 0100h * 14 ; Set Serial Port Timeout
|
||||
F_SetParallelTimeout equ VM+ 0100h * 15 ; Set Parallel Port Timeout
|
||||
F_VCPIEntry equ VM + 0100h * 16 ; Domain is going into VCPI mode
|
||||
F_VCPIExit equ VM + 0100h * 17 ; Domain has probably come out of VCPI mode
|
||||
F_SetGlobalMsgMode equ VM + 0100h * 18 ; Enter global message display mode
|
||||
F_DisplayGlobalMsg equ VM + 0100h * 19 ; Ditto, plus display message
|
||||
F_ExitGlobalMsgMode equ VM + 0100h * 20 ; Exit global message display mode
|
||||
F_SetDomainMsgMode equ VM + 0100h * 21 ; Enter domain message display mode
|
||||
F_DisplayDomainMsg equ VM + 0100h * 22 ; Ditto, plus display message
|
||||
F_ExitDomainMsgMode equ VM + 0100h * 23 ; Exit domain message display mode
|
||||
F_DisplayFatalMsg equ VM + 0100h * 24 ; Display fatal message
|
||||
F_SetSerialBase equ VM + 0100h * 25 ; Set Serial port base address
|
||||
F_SetParallelBase equ VM + 0100h * 26 ; Set Parallel port base address
|
||||
F_SetSerialIRQ equ VM + 0100h * 27 ; Set Serial port IRQ number
|
||||
F_SetParallelIRQ equ VM + 0100h * 28 ; Set Parallel port IRQ number
|
||||
F_ResetVideo equ VM + 0100h * 29 ; EMERGENCY reset of the video system
|
||||
F_SetMouseIRQ equ VM + 0100h * 30 ; Set mouse IRQ
|
||||
F_CheckNotIdle equ VM + 0100h * 31 ; Check if we are idle or not
|
||||
F_GetMouseInfo equ VM + 0100h * 32
|
||||
F_GetSerialOwner equ VM + 0100h * 33
|
||||
F_GetSerialTimeout equ VM + 0100h * 34
|
||||
F_GetParallelOwner equ VM + 0100h * 35
|
||||
F_GetParallelTimeout equ VM+ 0100h * 36
|
||||
|
||||
LAST_VM_FUNC equ 36
|
||||
|
||||
;------------
|
||||
|
||||
; DPMI Functions
|
||||
|
||||
; These "DPMI" functions are those that are provided by the DPMI module via the
|
||||
; Vladivar interface. True DPMI functions should be accessed via int 31h as per
|
||||
; the DPMI spec.
|
||||
|
||||
F_InitDPMI equ DPMI + 0100h * 0 ; used internally by DPMI. Do not call.
|
||||
F_DescAllocLDT equ DPMI + 0100H * 1 ; allocate an LDT descriptor
|
||||
F_DescFreeLDT equ DPMI + 0100H * 2 ; free an LDT descriptor
|
||||
F_DescGetLDT equ DPMI + 0100H * 3 ; same as F_DescGet, but for LDT
|
||||
F_DescSetLDT equ DPMI + 0100H * 4 ; same as F_DescSet, but for LDT
|
||||
F_DescAllocInt21 equ DPMI + 0100H * 5 ; allocate an LDT descriptor for pmode
|
||||
; int 21 memory allocation.
|
||||
F_WhereIsDPMI equ DPMI + 0100H * 6 ; return address of DPMI global data
|
||||
|
||||
LAST_DPMI_FUNC equ 6
|
||||
|
||||
131
IBMBIO/MSDOS.EQU
Normal file
131
IBMBIO/MSDOS.EQU
Normal file
@@ -0,0 +1,131 @@
|
||||
; File : $Workfile: MSDOS.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; MSDOS.EQU 1.1 92/11/10 10:48:56
|
||||
; Added to appslib source directory.
|
||||
; ENDLOG
|
||||
|
||||
MS_P_TERMCPM equ 00H
|
||||
MS_C_READ equ 01H
|
||||
MS_C_WRITE equ 02H
|
||||
MS_A_READ equ 03H
|
||||
MS_A_WRITE equ 04H
|
||||
MS_L_WRITE equ 05H
|
||||
MS_C_RAWIO equ 06H
|
||||
MS_C_RAWIN equ 07H
|
||||
MS_C_NOECHO equ 08H
|
||||
MS_C_WRITESTR equ 09H
|
||||
MS_C_READSTR equ 0aH
|
||||
MS_C_STAT equ 0bH
|
||||
MS_C_FLUSH equ 0cH
|
||||
MS_DRV_ALLRESET equ 0dH
|
||||
MS_DRV_SET equ 0eH
|
||||
MS_F_OPEN equ 0fH
|
||||
MS_F_CLOSE equ 10H
|
||||
MS_F_SFIRST equ 11H
|
||||
MS_F_SNEXT equ 12H
|
||||
MS_F_DELETE equ 13H
|
||||
MS_F_READ equ 14H
|
||||
MS_F_WRITE equ 15H
|
||||
MS_F_MAKE equ 16H
|
||||
MS_F_RENAME equ 17H
|
||||
MS_DRV_GET equ 19H
|
||||
MS_F_DMAOFF equ 1aH
|
||||
MS_DRV_ALLOC equ 1bH
|
||||
MS_DRV_ALLOCSPEC equ 1cH
|
||||
MS_F_READRAND equ 21H
|
||||
MS_F_WRITERAND equ 22H
|
||||
MS_F_SIZE equ 23H
|
||||
MS_F_RANDREC equ 24H
|
||||
MS_S_SETINT equ 25H
|
||||
MS_P_MKPSP equ 26H
|
||||
MS_F_READBLK equ 27H
|
||||
MS_F_WRITEBLK equ 28H
|
||||
MS_F_PARSE equ 29H
|
||||
MS_T_GETDATE equ 2aH
|
||||
MS_T_SETDATE equ 2bH
|
||||
MS_T_GETTIME equ 2cH
|
||||
MS_T_SETTIME equ 2dH
|
||||
MS_F_VERIFY equ 2eH
|
||||
MS_F_DMAGET equ 2fH
|
||||
MS_S_BDOSVER equ 30H
|
||||
MS_P_TERMKEEP equ 31H
|
||||
MS_S_BREAK equ 33H
|
||||
MS_S_GETINT equ 35H
|
||||
MS_DRV_SPACE equ 36H
|
||||
MS_S_COUNTRY equ 38H
|
||||
MS_X_MKDIR equ 39H
|
||||
MS_X_RMDIR equ 3aH
|
||||
MS_X_CHDIR equ 3bH
|
||||
MS_X_CREAT equ 3cH
|
||||
MS_X_OPEN equ 3dH
|
||||
MS_X_CLOSE equ 3eH
|
||||
MS_X_READ equ 3fH
|
||||
MS_X_WRITE equ 40H
|
||||
MS_X_UNLINK equ 41H
|
||||
MS_X_LSEEK equ 42H
|
||||
MS_X_CHMOD equ 43H
|
||||
MS_X_IOCTL equ 44H
|
||||
MS_X_DUP equ 45H
|
||||
MS_X_DUP2 equ 46H
|
||||
MS_X_CURDIR equ 47H
|
||||
MS_M_ALLOC equ 48H
|
||||
MS_M_FREE equ 49H
|
||||
MS_M_SETBLOCK equ 4aH
|
||||
MS_X_EXEC equ 4bH
|
||||
MS_X_EXIT equ 4cH
|
||||
MS_X_WAIT equ 4dH
|
||||
MS_X_FIRST equ 4eH
|
||||
MS_X_NEXT equ 4fH
|
||||
MS_P_SETPSP equ 50H
|
||||
MS_F_GETVERIFY equ 54H
|
||||
MS_X_RENAME equ 56H
|
||||
MS_X_DATETIME equ 57H
|
||||
MS_M_STRATEGY equ 58h
|
||||
MS_F_ERROR equ 59H
|
||||
MS_X_MKTEMP equ 5aH
|
||||
MS_X_MKNEW equ 5bH
|
||||
MS_F_LOCK equ 5cH
|
||||
MS_X_EXPAND equ 60H
|
||||
MS_P_GETPSP equ 62H
|
||||
MS_X_GETCP equ 6601h
|
||||
MS_X_SETCP equ 6602h
|
||||
MS_X_SETHC equ 67h
|
||||
MS_X_COMMIT equ 68h
|
||||
|
||||
DOS_INT equ 21h ; DOS Entry Point
|
||||
;
|
||||
STDIN equ 0 ; Standard Console Input Handle
|
||||
STDOUT equ 1 ; Standard Console Output Handle
|
||||
STDERR equ 2 ; Standard Error Output
|
||||
STDAUX equ 3 ; Auxilary Device Handle
|
||||
STDPRN equ 4 ; Printer Device Handle
|
||||
121
IBMBIO/MSERROR.EQU
Normal file
121
IBMBIO/MSERROR.EQU
Normal file
@@ -0,0 +1,121 @@
|
||||
; File : $MSERROR.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
ED_FUNCTION equ -01 ; invalid function number
|
||||
ED_FILE equ -02 ; file not found
|
||||
ED_PATH equ -03 ; path not found
|
||||
ED_HANDLE equ -04 ; too many open files
|
||||
ED_ACCESS equ -05 ; file access denied
|
||||
ED_H_MATCH equ -06 ; invalid handle number
|
||||
ED_DMD equ -07 ; memory descriptor destroyed
|
||||
ED_MEMORY equ -08 ; insufficient memory
|
||||
ED_BLOCK equ -09 ; invalid memory block addr
|
||||
ED_ENVIRON equ -10 ; invalid environment
|
||||
ED_FORMAT equ -11 ; invalid format
|
||||
ED_ACC_CODE equ -12 ; invalid access code
|
||||
ED_DATA equ -13 ; invalid data
|
||||
ED_DRIVE equ -15 ; invalid drive specified
|
||||
ED_DIR equ -16 ; can't remove current dir
|
||||
ED_DEVICE equ -17 ; not same device
|
||||
ED_ROOM equ -18 ; no more files
|
||||
|
||||
ED_PROTECT equ -19 ; disk write protected
|
||||
ED_BADUNIT equ -20 ; invalid drive specified
|
||||
ED_NOTREADY equ -21 ; drive doesn't respond
|
||||
ED_BADCMD equ -22 ; invalid command to driver
|
||||
ED_BADDATA equ -23 ; data CRC error
|
||||
ED_BADRHLEN equ -24 ; (shouldn't happen)
|
||||
ED_BADSEEK equ -25 ; can't seek to track
|
||||
ED_BADMEDIA equ -26 ; unrecognizable medium
|
||||
ED_RNF equ -27 ; record/sector not found
|
||||
ED_NOPAPER equ -28 ; printer error
|
||||
ED_WRFAIL equ -29 ; write failed
|
||||
ED_RDFAIL equ -30 ; read failed
|
||||
ED_GENFAIL equ -31 ; anything failed
|
||||
ED_SHAREFAIL equ -32 ; sharing conflict
|
||||
ED_LOCKFAIL equ -33 ; locking conflict
|
||||
ED_DISKCHG equ -34 ; invalid disk change
|
||||
ED_NOFCBS equ -35 ; FCB table exhausted
|
||||
ED_NOLOCKS equ -36 ; lock list items exhausted
|
||||
ED_NET equ -50 ; Network Request Not Supported
|
||||
|
||||
ED_NETACCESS equ -65 ; file access denied
|
||||
|
||||
ED_NETPWD equ -73 ; Server Password Error
|
||||
ED_NETVER equ -74 ; Incorrect Server version
|
||||
ED_NETREQ equ -75 ; No Local Network Resources
|
||||
ED_NETTIME equ -76 ; Network Time Out Error
|
||||
ED_NETCOMM equ -77 ; Network Communications Error
|
||||
ED_NETSRVR equ -78 ; No Server Network Resources
|
||||
ED_NETLOG equ -79 ; Server Not Logged In
|
||||
|
||||
ED_EXISTS equ -80 ; file already exists
|
||||
ED_MAKE equ -82 ; Cannot Make (Files ??)
|
||||
ED_FAIL equ -83 ; FAIL code returned from INT 24
|
||||
ED_STRUCT equ -84 ; Out of Structures
|
||||
ED_ASSIGN equ -85 ; Already Assigned
|
||||
ED_PASSWORD equ -86 ; Invalid Password
|
||||
ED_PARAM equ -87 ; Invalid Parameter
|
||||
ED_NETWRITE equ -88 ; Network write fault
|
||||
ED_NETFUNC equ -89 ; Function not supported on network
|
||||
ED_COMPONENT equ -90 ; system component not installed
|
||||
ED_LASTERROR equ -90 ; Last Error Number Used
|
||||
|
||||
CLASS_RESOURCE equ 1 ; Out of Resource
|
||||
CLASS_TEMP equ 2 ; Temporary Situation
|
||||
CLASS_AUTHOR equ 3 ; Authorization Error
|
||||
CLASS_INTERNAL equ 4 ; Internal System Software Error
|
||||
CLASS_HARDWARE equ 5 ; Hardware Failure
|
||||
CLASS_SYSTEM equ 6 ; Serious System Failure
|
||||
CLASS_APPLIC equ 7 ; Application Program Error
|
||||
CLASS_LOST equ 8 ; File/Item Not Found
|
||||
CLASS_FORMAT equ 9 ; File/Item Illegal Format
|
||||
CLASS_LOCKED equ 10 ; File/Item Locked
|
||||
CLASS_MEDIA equ 11 ; Media Failure
|
||||
CLASS_EXISTS equ 12 ; Item Already Exists
|
||||
CLASS_UNKNOWN equ 13 ; Unknown Classification
|
||||
|
||||
ACT_RETRY equ 1 ; Retry a few times then prompt user
|
||||
ACT_DELAY equ 2 ; Delay then as ACT_RETRY
|
||||
ACT_USER equ 3 ; Prompt user to re-enter data
|
||||
ACT_ABORT equ 4 ; Clean Up then ABORT the process
|
||||
ACT_TERM equ 5 ; Terminate immeadiately NO CLEAN UP
|
||||
ACT_IGNORE equ 6 ; Ignore the Error
|
||||
ACT_URETRY equ 7 ; Retry the error after user intervention
|
||||
|
||||
LOC_UNKNOWN equ 1 ; Unknown error location
|
||||
LOC_BLOCK equ 2 ; Block Device Failure
|
||||
LOC_NET equ 3 ; Network Failure
|
||||
LOC_CHAR equ 4 ; Related to Serial/Character devices
|
||||
LOC_MEMORY equ 5 ; Failure related to Memory
|
||||
417
IBMBIO/NLSFUNC.A86
Normal file
417
IBMBIO/NLSFUNC.A86
Normal file
@@ -0,0 +1,417 @@
|
||||
; File : $NLSFUNC.A86$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; NLSFUNC.A86 1.6 93/12/01 18:30:10
|
||||
; Read in full 258 bytes of collating info
|
||||
; ENDLOG
|
||||
|
||||
;
|
||||
; We have a problem with NLSFUNC.EXE - if this isn't loaded with an INSTALL=
|
||||
; in CONFIG.SYS then the calls to set language/codepage will fail.
|
||||
; So we provide the same functionality that NLSFUNC.EXE does here in the
|
||||
; initialisation code. "nls_hook" is called by CONFIG before the country is
|
||||
; set, then "nls_unhook" is called afterwards so we can throw away this code.
|
||||
;
|
||||
|
||||
VALID_SIG equ 0EDC1h ; valid signature in COUNTRY.SYS file
|
||||
|
||||
DH_NEXT equ ds:dword ptr 0 ; Dword Pointer to Next DEV
|
||||
DH_ATTRIB equ ds:word ptr 4 ; device attribute bits
|
||||
DH_NAME equ ds:byte ptr 10 ; 8-BYTE device name
|
||||
|
||||
DA_CHARDEV equ 8000h ; 1=character device, 0=block device
|
||||
DA_IOCTL equ 4000h ; device supports IOCTL string I/O
|
||||
DA_GETSET equ 0040h ; supports 3.2 level functionality
|
||||
|
||||
include config.equ
|
||||
include i:msdos.equ
|
||||
include i:mserror.equ
|
||||
|
||||
|
||||
CGROUP GROUP INITCODE
|
||||
INITCODE CSEG PARA 'INITCODE'
|
||||
|
||||
; We share our NLS buffer with other temporary users
|
||||
|
||||
extrn nls_temp_area:byte
|
||||
|
||||
Public nls_hook, nls_unhook
|
||||
|
||||
nls_hook:
|
||||
;--------
|
||||
; On Entry:
|
||||
; none
|
||||
; On Exit:
|
||||
; none
|
||||
;
|
||||
push es
|
||||
mov ah,MS_S_GETINT
|
||||
mov al,2fh
|
||||
int DOS_INT ; read and save old INT 2F vector
|
||||
mov old_int2f_off,bx
|
||||
mov old_int2f_seg,es
|
||||
mov ah,MS_S_SETINT
|
||||
mov al,2fh
|
||||
mov dx,offset int2f_handler ; install our own INT 2F handler
|
||||
int DOS_INT
|
||||
pop es
|
||||
ret
|
||||
|
||||
nls_unhook:
|
||||
;----------
|
||||
; On Entry:
|
||||
; none
|
||||
; On Exit:
|
||||
; none
|
||||
;
|
||||
push ds
|
||||
mov dx,old_int2f_off
|
||||
mov ds,old_int2f_seg
|
||||
mov ah,MS_S_SETINT ; restore INT 2F vector
|
||||
mov al,2fh
|
||||
int DOS_INT
|
||||
pop ds
|
||||
ret
|
||||
|
||||
|
||||
old_int2f rd 0
|
||||
|
||||
old_int2f_off dw 0
|
||||
old_int2f_seg dw 0
|
||||
|
||||
int2f_handler:
|
||||
;-------------
|
||||
cmp ah,014h ; is it for us ?
|
||||
je int2f_handler10
|
||||
jmpf old_int2f ; no, pass it on
|
||||
|
||||
int2f_handler10:
|
||||
cmp al,0 ; installation check ?
|
||||
jne int2f_handler20
|
||||
mov al,0ffh ; we are already installed
|
||||
iret
|
||||
|
||||
int2f_handler20:
|
||||
cmp al,0ffh ; Codepage Prep ?
|
||||
jne int2f_handler30
|
||||
call f66_prep
|
||||
retf 2 ; iret, keeping flags
|
||||
|
||||
int2f_handler30:
|
||||
cmp al,0feh ; Country Get Data ?
|
||||
jne int2f_handler40
|
||||
call f65_locate_and_read
|
||||
retf 2 ; iret, keeping flags
|
||||
|
||||
int2f_handler40:
|
||||
stc ; CY to indicate an error
|
||||
mov ax,-ED_FUNCTION ; function not supported
|
||||
retf 2 ; return an error
|
||||
|
||||
|
||||
f66_cp dw 0 ; INT21/66 Local Variable
|
||||
cp_packet dw 2 ; Packet Size
|
||||
cp_cpid dw 0 ; Request CodePage
|
||||
db 0,0 ; Packet Terminators
|
||||
|
||||
preperr dw 0 ; Prepare function Error Code
|
||||
prepname rb 9 ; Reserved for ASCIIZ Device Name
|
||||
|
||||
;
|
||||
; Area for country.sys current pointer table
|
||||
; (these are all offsets into country.sys)
|
||||
;
|
||||
f65xx_code dw 0 ; Country code
|
||||
f65xx_cp dw 0 ; Code page
|
||||
dw 0 ; +1 reserved
|
||||
f65xx_data dw 0 ; Data area
|
||||
dw 0 ; Upper case table
|
||||
dw 0 ; +1 reserved
|
||||
dw 0 ; Filename upper case table
|
||||
dw 0 ; Legal file characters
|
||||
dw 0 ; Collating table
|
||||
dw 0 ; Double byte character set lead byte table
|
||||
f65xx_ptable_len equ 20
|
||||
|
||||
f65xx_codepage dw 0
|
||||
f65xx_country dw 0
|
||||
f65xx_sig dw 0 ; Signature
|
||||
c_handle dw 0
|
||||
|
||||
|
||||
f66_prep:
|
||||
;
|
||||
; This function scans the complete device list and prepares
|
||||
; all devices which support codepage.
|
||||
;
|
||||
; On Entry BX Requested CodePage
|
||||
;
|
||||
; On Exit AX Last Error Code
|
||||
;
|
||||
DA_CODEPAGE equ DA_CHARDEV+DA_IOCTL+DA_GETSET
|
||||
|
||||
push ds
|
||||
push es
|
||||
push cs
|
||||
pop es
|
||||
mov f66_cp,bx ; Save requested CodePage
|
||||
mov preperr,0000 ; Initialize Prepare Error
|
||||
mov ax,122ch ; magic hook get Device List
|
||||
int 2fh ; after the NUL entry
|
||||
mov ds,bx ; BX:AX -> header after INT 2F
|
||||
mov bx,ax ; DS:BX -> header to be useful
|
||||
f66_p10:
|
||||
push ds
|
||||
push bx
|
||||
mov ax,DH_ATTRIB[bx]
|
||||
and ax,DA_CODEPAGE ; Check for a Character Device which
|
||||
cmp ax,DA_CODEPAGE ; supports IOCTL strings and GETSET
|
||||
jnz f66_p40 ; otherwise skip the device
|
||||
|
||||
lea si,DH_NAME[bx] ; Found a matching device so
|
||||
mov di,offset prepname ; open the device and select the
|
||||
mov cx,8 ; requested codepage
|
||||
|
||||
f66_p20:
|
||||
lodsb
|
||||
cmp al,' '
|
||||
je f66_p30
|
||||
stosb
|
||||
loop f66_p20
|
||||
|
||||
f66_p30:
|
||||
xor al,al
|
||||
stosb
|
||||
push cs
|
||||
pop ds
|
||||
mov dx,offset prepname ; Write Access
|
||||
mov cl,1 ; Open for write
|
||||
mov ax,1226h
|
||||
int 2fh ; call magic hook
|
||||
jc f66_perr
|
||||
mov bx,ax ; Save Device Handle in BX
|
||||
|
||||
mov si,f66_cp ; Get Requested CodePage in SI
|
||||
mov dx,offset cp_packet ; Offset of CodePage Struct
|
||||
mov cx,006Ah ; Get Unknown CodePage
|
||||
push bp
|
||||
mov bp,0ch ; Generic IOCTL
|
||||
mov ax,122bh
|
||||
int 2fh ; call magic hook
|
||||
pop bp
|
||||
jc f66_p32 ; Error so Select requested Code Page
|
||||
|
||||
cmp si,cp_cpid
|
||||
je f66_p35 ; If this the currently selected
|
||||
f66_p32: ; skip the select CodePage
|
||||
mov cp_cpid,si
|
||||
mov dx,offset cp_packet ; Offset of CodePage Struct
|
||||
mov cx,004Ah ; Select Unkown CodePage
|
||||
push bp
|
||||
mov bp,0ch ; Generic IOCTL
|
||||
mov ax,122bh
|
||||
int 2fh ; call magic hook
|
||||
pop bp
|
||||
jnc f66_p35 ; No Error so skip the error
|
||||
f66_p33:
|
||||
mov preperr,ax ; save
|
||||
|
||||
f66_p35:
|
||||
mov ax,1227h
|
||||
int 2fh ; magic hook to close handle
|
||||
jmp f66_p40
|
||||
|
||||
f66_perr:
|
||||
mov preperr,ax ; Save the error code and try the
|
||||
f66_p40: ; next device in the chain
|
||||
pop bx ; Restore the Device offset
|
||||
pop ds
|
||||
lds bx,DH_NEXT[bx] ; check next character device for
|
||||
cmp bx,0FFFFh ; Codepage support
|
||||
jne f66_p10
|
||||
|
||||
mov ax,preperr ; All devices have been prepared
|
||||
pop es
|
||||
pop ds
|
||||
or ax,ax ; now return the last error code
|
||||
ret ; in AX
|
||||
|
||||
;
|
||||
; **********************************************************************
|
||||
; *** Function 65 support - routines for seeking a country/codepage ***
|
||||
; *** and loading the required information into the temp data area ***
|
||||
; **********************************************************************
|
||||
;
|
||||
; **************************************************
|
||||
; *** Open country.sys and search for the ***
|
||||
; *** table of offsets for the given country/ ***
|
||||
; *** codepage, read it in and exit. ***
|
||||
; **************************************************
|
||||
|
||||
f65_locate_and_read:
|
||||
;-------------------
|
||||
; Locate and Read info CL for Country DX Codepage BX using file DS:DI
|
||||
test di,di ; valid filename ?
|
||||
stc
|
||||
jz f65_lr_exit
|
||||
|
||||
push cx
|
||||
call f65x_find_info ; Will need to load up the info
|
||||
pop ax
|
||||
jc f65_lr_exit ; so do it if we can.
|
||||
|
||||
mov dx,offset nls_temp_area
|
||||
mov cx,258 ; read 258 bytes into local buffer
|
||||
push ax
|
||||
call f65x_load_info ; Load required info
|
||||
pop ax
|
||||
jc f65_lr_exit
|
||||
mov bx,c_handle ; Close the file first
|
||||
mov ax,1227h
|
||||
int 2fh ; magic hook to close handle
|
||||
jc f65_lr_exit
|
||||
mov si,offset nls_temp_area ; Tell subroutines where info is
|
||||
f65_lr_exit:
|
||||
ret
|
||||
;
|
||||
; Entry: dx=country code, bx=codepage
|
||||
; Exit : carry set, and country.sys closed if failure
|
||||
; country.sys open ready for more reads if success
|
||||
;
|
||||
f65x_find_info:
|
||||
mov f65xx_country,dx
|
||||
mov f65xx_codepage,bx
|
||||
mov dx,di
|
||||
xor cx,cx ; Open for read
|
||||
mov ax,1226h
|
||||
int 2fh ; call magic hook
|
||||
push cs ; get DS pointing to this segment
|
||||
pop ds ; for future reads
|
||||
jnc f65x_10
|
||||
ret ; Successful open?
|
||||
f65x_10:
|
||||
mov c_handle,ax ; Save handle
|
||||
mov dx,f65xx_country
|
||||
cmp f65xx_code,dx ; do we already have the information?
|
||||
jne f65x_30 ; No - get it from country.sys
|
||||
f65x_20:
|
||||
cmp f65xx_cp,bx ; Does codepage agree too?
|
||||
je f65x_35 ; Yes so exit with no more ado
|
||||
f65x_30:
|
||||
mov dx,007Eh
|
||||
xor cx,cx ; Seek within country.sys
|
||||
mov bx,c_handle
|
||||
push bp
|
||||
mov bp,0 ; seek from begining
|
||||
mov ax,1228h
|
||||
int 2fh
|
||||
pop bp
|
||||
jc f65x_err
|
||||
mov bx,c_handle ; check them
|
||||
mov cx,2
|
||||
mov dx,offset f65xx_sig
|
||||
mov ax,1229h
|
||||
int 2fh ; read the signature bytes
|
||||
jc f65x_err
|
||||
cmp f65xx_sig,VALID_SIG
|
||||
jne f65x_err ; If signature bad exit
|
||||
f65x_32:
|
||||
mov bx,c_handle ; Read from country.sys header until
|
||||
mov cx,f65xx_ptable_len ; Country/codepage found or NULL
|
||||
mov dx,offset f65xx_code
|
||||
mov ax,1229h
|
||||
int 2fh
|
||||
jc f65x_err
|
||||
cmp f65xx_code,0 ; Found NULL so reqd combination
|
||||
je f65x_err ; was not found
|
||||
mov dx,f65xx_code ; Get the country/codepage values
|
||||
mov bx,f65xx_cp ; read from Country.SYS
|
||||
cmp dx,f65xx_country ; Check against the requested
|
||||
jne f65x_32 ; Country.
|
||||
cmp f65xx_codepage,0 ; If a codepage match is not
|
||||
jz f65x_35 ; then return success
|
||||
cmp bx,f65xx_codepage ; Check against the requested
|
||||
jne f65x_32 ; Codepage
|
||||
f65x_35:
|
||||
mov f65xx_country,dx ; Force the Search Country and
|
||||
mov f65xx_codepage,bx ; CodePage to be Updated
|
||||
ret
|
||||
|
||||
f65x_err:
|
||||
mov bx,c_handle ; and set the carry flag before
|
||||
mov ax,1227h
|
||||
int 2fh ; magic hook to close handle
|
||||
stc
|
||||
ret
|
||||
|
||||
;
|
||||
; **************************************************
|
||||
; *** Load the type of information requested ***
|
||||
; *** For the country currently active in the ***
|
||||
; *** offset table ***
|
||||
; **************************************************
|
||||
;
|
||||
; Entry: al=type of info, dx=offset of buffer to read info into cx=no of bytes
|
||||
; Exit : carry set, and country.sys closed if failure
|
||||
;
|
||||
f65x_load_info:
|
||||
push es
|
||||
push cx
|
||||
push dx
|
||||
push ds ; Make es=ds
|
||||
pop es
|
||||
dec al ; 1=Data , 2=uppercase, 4=fuppercase
|
||||
sub bh,bh ; 5=filechars, 6=Collating table
|
||||
mov bl,al ; 7=DBCS table
|
||||
shl bx,1 ; Retrieve relevant offset
|
||||
mov dx,f65xx_data[bx]
|
||||
xor cx,cx ; Seek within country.sys
|
||||
mov bx,c_handle
|
||||
push bp
|
||||
mov bp,0 ; seek from begining
|
||||
mov ax,1228h
|
||||
int 2fh
|
||||
pop bp
|
||||
pop dx ; Get buffer address back
|
||||
pop cx ; and number of bytes to read
|
||||
jc f65x_err
|
||||
test ax,ax ; zero offset is a problem
|
||||
jz f65x_err ; (probably DBCS with old COUNTRY.SYS)
|
||||
mov bx,c_handle ; Now read that info into our data area
|
||||
mov ax,1229h
|
||||
int 2fh
|
||||
jc f65x_err
|
||||
pop es
|
||||
ret
|
||||
|
||||
|
||||
end
|
||||
104
IBMBIO/PATCH.COD
Normal file
104
IBMBIO/PATCH.COD
Normal file
@@ -0,0 +1,104 @@
|
||||
; File : $PATCH.COD$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
;*****************************************************
|
||||
;*
|
||||
;* PATCH AREA -- 256 bytes long
|
||||
;*
|
||||
;*****************************************************
|
||||
|
||||
patch:
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;00-0f
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;10-1f
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;20-2f
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;30-3f
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;40-4f
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;50-5f
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;60-6f
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;70-7f
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;80-8f
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;90-9f
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;a0-af
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;b0-bf
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;c0-cf
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;d0-df
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;e0-ef
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
|
||||
nop ! nop ! nop ! nop ! nop ! nop ;f0-ff
|
||||
nop ! nop ! nop ! nop ! nop ! nop
|
||||
nop ! nop ! nop ! nop
|
||||
108
IBMBIO/PSP.DEF
Normal file
108
IBMBIO/PSP.DEF
Normal file
@@ -0,0 +1,108 @@
|
||||
; File : $PSP.DEF$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
; Program Segment Prefix
|
||||
; ----------------------
|
||||
; This structure holds vital information for DOS programs
|
||||
;
|
||||
;*******************************************************************************
|
||||
;*
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 00 | int 20 | memory | *** | jmpf|longjmp off|
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 08 |longjmp seg| int22 Off | int22 Seg | int22 Off |
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 10 | int22 Seg | int24 Off | int24 Seg | Parent |
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 18 | Default Handle Table |
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 20 | XFT (20 entries) |
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 28 | XFT contd. | Environ | User SP |
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 30 | User SS | xfnmax | xftoff | xftseg |
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 38 | res1 | res2 | ric | *** | ********* |
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 40 | version | ********* | ********* | ********* |
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 48 | ********* | ********* | ********* | ********* |
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 50 | int 21 | retf| *** | ********* | ********* |
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
;* 58 | ********* | ********* | PSP fcb 1 |
|
||||
;* +-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
|
||||
PSP_INT20 equ es:word ptr .0000h
|
||||
PSP_MEMORY equ es:word ptr .0002h
|
||||
;PSP_??? equ es:byte ptr .0004h
|
||||
PSP_LONGCALL equ es:byte ptr .0005h
|
||||
PSP_LONGOFF equ es:word ptr .0006h
|
||||
PSP_LONGSEG equ es:word ptr .0008h
|
||||
PSP_TERM_IP equ es:word ptr .000Ah
|
||||
PSP_TERM_CS equ es:word ptr .000Ch
|
||||
PSP_BREAK_IP equ es:word ptr .000Eh
|
||||
PSP_BREAK_CS equ es:word ptr .0010h
|
||||
PSP_ERROR_IP equ es:word ptr .0012h
|
||||
PSP_ERROR_CS equ es:word ptr .0014h
|
||||
PSP_PARENT equ es:word ptr .0016h
|
||||
PSP_XFT equ es:byte ptr .0018h
|
||||
;
|
||||
; The Default Handle Table is HERE !!
|
||||
;
|
||||
PSP_ENVIRON equ es:word ptr .002ch
|
||||
PSP_USERSP equ es:word ptr .002eh
|
||||
PSP_USERSS equ es:word ptr .0030h
|
||||
PSP_XFNMAX equ es:word ptr .0032h
|
||||
PSP_XFTPTR equ es:dword ptr .0034h
|
||||
PSP_XFTOFF equ es:word ptr .0034h
|
||||
PSP_XFTSEG equ es:word ptr .0036h
|
||||
PSP_RES1 equ es:word ptr .0038h ; DOS Reserved 0FFFFh
|
||||
PSP_RES2 equ es:word ptr .003Ah ; DOS Reserved 0FFFFh
|
||||
PSP_RIC equ es:byte ptr .003Ch ; Return Interim Character flag
|
||||
PSP_VERSION equ es:word ptr .0040h ; DOS version number
|
||||
|
||||
|
||||
PSP_DOSCALL equ es:word ptr .0050h
|
||||
PSP_DOSRETF equ es:byte ptr .0052h
|
||||
|
||||
PSP_FCB1 equ es:byte ptr .005Ch
|
||||
PSP_FCB2 equ es:byte ptr .006Ch
|
||||
PSP_COMLEN equ es:byte ptr .0080h
|
||||
PSP_COMLINE equ es:byte ptr .0081h
|
||||
|
||||
XFNMAX equ 20
|
||||
|
||||
PSPLEN equ 100h
|
||||
PSPILEN equ 60h
|
||||
167
IBMBIO/REQHDR.EQU
Normal file
167
IBMBIO/REQHDR.EQU
Normal file
@@ -0,0 +1,167 @@
|
||||
; File : $REQHDR.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
|
||||
CMD_INIT equ 0 ; Initialize the Device Driver
|
||||
CMD_MEDIA_CHECK equ 1 ; Request Media Check
|
||||
CMD_BUILD_BPB equ 2 ; Build Drive BPB
|
||||
CMD_INPUT_IOCTL equ 3 ; IOCTL input
|
||||
CMD_INPUT equ 4 ; Input
|
||||
CMD_INPUT_NOWAIT equ 5 ; Non destructive input no wait
|
||||
CMD_INPUT_STATUS equ 6 ; Input status
|
||||
CMD_INPUT_FLUSH equ 7 ; Input flush
|
||||
CMD_OUTPUT equ 8 ; Output
|
||||
CMD_OUTPUT_VERIFY equ 9 ; Output with verify
|
||||
CMD_OUTPUT_STATUS equ 10 ; Output status
|
||||
CMD_OUTPUT_FLUSH equ 11 ; Output flush
|
||||
CMD_OUTPUT_IOCTL equ 12 ; IOCTL output
|
||||
CMD_DEVICE_OPEN equ 13 ; Device OPEN
|
||||
CMD_DEVICE_CLOSE equ 14 ; Device CLOSE
|
||||
CMD_FIXED_MEDIA equ 15 ; Removeable Media Check
|
||||
CMD_GENERIC_IOCTL equ 19 ; Generic IOCTL
|
||||
CMD_GET_DEVICE equ 23 ; Get the Logical Device
|
||||
CMD_SET_DEVICE equ 24 ; Set the Logical Device
|
||||
CMD_QUERY_IOCTL equ 25 ; query ioctl support
|
||||
|
||||
; Generic Request Header Format
|
||||
|
||||
RH_LEN equ es:byte ptr 0[bx]
|
||||
RH_UNIT equ es:byte ptr 1[bx]
|
||||
RH_CMD equ es:byte ptr 2[bx]
|
||||
RH_STATUS equ es:word ptr 3[bx]
|
||||
RHS_DONE equ 0100h
|
||||
RHS_BUSY equ 0200h
|
||||
RHS_IC equ 0400h ; Interim Character
|
||||
RHS_RM equ 0800h
|
||||
RHS_ERROR equ 8000h
|
||||
|
||||
;******
|
||||
;* No longer safe to use - some device drivers trample on them....
|
||||
;*
|
||||
;* RH_STRATEGY equ es:dword ptr 5[bx] ; Device Strategy Routine
|
||||
;* RH_STRATOFF equ es:word ptr 5[bx] ; Strategy Offset
|
||||
;* RH_STRATSEG equ es:word ptr 7[bx] ; Strategy Segment
|
||||
;* RH_INTERRUPT equ es:dword ptr 9[bx] ; Device Interrupt Routine
|
||||
;* RH_INTOFF equ es:word ptr 9[bx] ; Intterupt Offset
|
||||
;* RH_INTSEG equ es:word ptr 11[bx] ; Interrupt Segment
|
||||
;*****
|
||||
|
||||
; Request header for initialization
|
||||
|
||||
RH0_NUNITS equ es:byte ptr 13[bx]
|
||||
RH0_RESIDENT equ es:word ptr 14[bx]
|
||||
RH0_BPBOFF equ es:word ptr 18[bx]
|
||||
RH0_BPBSEG equ es:word ptr 20[bx]
|
||||
RH0_DRIVE equ es:byte ptr 22[bx]
|
||||
RH0_LEN equ 22
|
||||
|
||||
; Request header for media check
|
||||
|
||||
RH1_MEDIA equ es:byte ptr 13[bx] ; BDOS: current media byte
|
||||
RH1_RETURN equ es:byte ptr 14[bx] ; driver: return code (00, 01, FF)
|
||||
RH1_VOLID equ es:dword ptr 15[bx] ; driver: volume label address
|
||||
RH1_LEN equ 15
|
||||
|
||||
; Request header for "build BPB"
|
||||
|
||||
RH2_MEDIA equ es:byte ptr 13[bx] ; BDOS or driver?
|
||||
RH2_BUFFER equ es:dword ptr 14[bx] ; BDOS: scratch buffer for driver use
|
||||
RH2_BPB equ es:dword ptr 18[bx] ; same as the following:
|
||||
RH2_BPBOFF equ es:word ptr 18[bx] ; driver: address of new BPB
|
||||
RH2_BPBSEG equ es:word ptr 20[bx]
|
||||
RH2_LEN equ 24
|
||||
|
||||
; Request header for input/output
|
||||
|
||||
RH4_MEDIA equ es:byte ptr 13[bx] ; BDOS: current media byte
|
||||
RH4_RIC equ es:byte ptr 13[bx] ; BDOS: Return Interim Char flg
|
||||
RH4_BUFFER equ es:dword ptr 14[bx] ; BDOS: disk transfer address
|
||||
RH4_BUFOFF equ es:word ptr 14[bx] ; BDOS: Buffer Offset
|
||||
RH4_BUFSEG equ es:word ptr 16[bx] ; BDOS: Buffer Segment
|
||||
RH4_COUNT equ es:word ptr 18[bx] ; BDOS: sector count
|
||||
RH4_SECTOR equ es:word ptr 20[bx] ; BDOS: starting sector
|
||||
RH4_VOLID equ es:dword ptr 22[bx] ; driver: volume if illegal disk change
|
||||
RH4_BIGSECTOR equ es:dword ptr 26[bx]
|
||||
RH4_BIGSECTORLO equ es:word ptr 26[bx]
|
||||
RH4_BIGSECTORHI equ es:word ptr 28[bx]
|
||||
|
||||
RH4_LEN equ 30
|
||||
|
||||
; Request Header for Non-Destructive Input
|
||||
|
||||
RH5_CHAR equ es:byte ptr 13[bx] ; Character Read from Device
|
||||
RH5_RIC equ es:byte ptr 13[bx] ; BDOS: Return Interim Char flg
|
||||
RH5_LEN equ 14
|
||||
|
||||
; Request Header for Device Open
|
||||
|
||||
RH13_LEN equ 13
|
||||
|
||||
; Request Header for Device Close
|
||||
|
||||
RH14_LEN equ 13
|
||||
|
||||
; Request header for generic IOCTL
|
||||
|
||||
RH19_CATEGORY equ es:word ptr 13[bx] ; BDOS: major/minor function number
|
||||
RH19_MAJOR equ es:byte ptr 13[bx] ; BDOS: Major Function Number
|
||||
RH19_MINOR equ es:byte ptr 14[bx] ; BDOS: Minor Function Number
|
||||
RH19_SI equ es:word ptr 15[bx] ; BDOS: User SI
|
||||
RH19_DI equ es:word ptr 17[bx] ; BDOS: User DI
|
||||
RH19_GENPB equ es:dword ptr 19[bx] ; BDOS: extra parameters
|
||||
RH19_LEN equ 23
|
||||
|
||||
RQ19_SET equ 40h ; set device parameters
|
||||
RQ19_GET equ 60h ; get device parameters
|
||||
RQ19_WRITE equ 41h ; write tracks
|
||||
RQ19_READ equ 61h ; read tracks
|
||||
RQ19_FORMAT equ 42h ; format tracks
|
||||
RQ19_VERIFY equ 62h ; verify tracks
|
||||
|
||||
RQ19_PRP_START equ 4Ch ; start of codepage prepare
|
||||
RQ19_PRP_END equ 4Dh ; end of codepage prepare
|
||||
RQ19_SELECT equ 4Ah ; select code page
|
||||
RQ19_QRY_SEL equ 6Ah ; query selected code page
|
||||
RQ19_QRY_PRP equ 6Bh ; query prepared code page(s)
|
||||
RQ19_DSP_SET equ 5Fh ; set display information
|
||||
RQ19_DSP_GET equ 7Fh ; get display information
|
||||
|
||||
; Request header for get/set drive
|
||||
|
||||
RH24_CMD equ es:byte ptr 14[bx] ; BDOS: Command Code
|
||||
RH24_STATUS equ es:word ptr 15[bx] ; BDOS: Status
|
||||
RH24_RESVD equ es:dword ptr 17[bx] ; BDOS: Reserved
|
||||
RH24_LEN equ 21
|
||||
|
||||
RH_SIZE equ 30 ; maximum size of request header
|
||||
193
IBMBIO/REQUEST.EQU
Normal file
193
IBMBIO/REQUEST.EQU
Normal file
@@ -0,0 +1,193 @@
|
||||
; File : $REQUEST.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
; ENDLOG
|
||||
|
||||
|
||||
P_DSTRUC struc
|
||||
dw ?
|
||||
REQUEST dd ?
|
||||
P_DMA dd ?
|
||||
P_DSTRUC ends
|
||||
|
||||
P_STRUC struc
|
||||
dw ? ; saved BP
|
||||
REQUEST_OFF dw ? ; request header offset
|
||||
REQUEST_SEG dw ? ; request header segment
|
||||
P_DMAOFF dw ? ; transfer offset
|
||||
P_DMASEG dw ? ; transfer segment
|
||||
P_RETRY db ? ; retry count for disk errors
|
||||
P_DIRECT db ? ; 0 if DMA deblocking required
|
||||
P_ROSCMD db ? ; 2 = read, 3 = write, 4 = verify
|
||||
P_SETTLE db ? ; for fast settle on reads
|
||||
P_SECTOR db ? ; sector # (0..BPB_SPT-1)
|
||||
P_HEAD db ? ; head # (0..BPB_HEADS-1)
|
||||
P_CYL dw ? ; cylinder # (0..1023)
|
||||
P_COUNT dw ? ; requested sector count
|
||||
P_MCNT dw ? ; physical sector count
|
||||
P_STRUC ends
|
||||
|
||||
|
||||
|
||||
CMD_INIT equ 0 ; Initialize the Device Driver
|
||||
CMD_MEDIA_CHECK equ 1 ; Request Media Check
|
||||
CMD_BUILD_BPB equ 2 ; Build Drive BPB
|
||||
CMD_INPUT_IOCTL equ 3 ; IOCTL input
|
||||
CMD_INPUT equ 4 ; Input
|
||||
CMD_INPUT_NOWAIT equ 5 ; Non destructive input no wait
|
||||
CMD_INPUT_STATUS equ 6 ; Input status
|
||||
CMD_INPUT_FLUSH equ 7 ; Input flush
|
||||
CMD_OUTPUT equ 8 ; Output
|
||||
CMD_OUTPUT_VERIFY equ 9 ; Output with verify
|
||||
CMD_OUTPUT_STATUS equ 10 ; Output status
|
||||
CMD_OUTPUT_FLUSH equ 11 ; Output flush
|
||||
CMD_OUTPUT_IOCTL equ 12 ; IOCTL output
|
||||
CMD_DEVICE_OPEN equ 13 ; Device OPEN
|
||||
CMD_DEVICE_CLOSE equ 14 ; Device CLOSE
|
||||
CMD_FIXED_MEDIA equ 15 ; Removeable Media Check
|
||||
CMD_GENERIC_IOCTL equ 19 ; Generic IOCTL
|
||||
CMD_GET_DEVICE equ 23 ; Get the Logical Device
|
||||
CMD_SET_DEVICE equ 24 ; Set the Logical Device
|
||||
CMD_QUERY_IOCTL equ 25 ; query ioctl support
|
||||
|
||||
; Generic Request Header Format
|
||||
|
||||
RH_LEN equ byte ptr 0
|
||||
RH_UNIT equ byte ptr 1
|
||||
RH_CMD equ byte ptr 2
|
||||
RH_STATUS equ word ptr 3
|
||||
RHS_DONE equ 0100h
|
||||
RHS_BUSY equ 0200h
|
||||
RHS_IC equ 0400h ; Interim Character
|
||||
RHS_RM equ 0800h
|
||||
RHS_ERROR equ 8000h
|
||||
|
||||
;******
|
||||
;* No longer safe to use - some device drivers trample on them....
|
||||
;*
|
||||
;* RH_STRATEGY equ dword ptr 5 ; Device Strategy Routine
|
||||
;* RH_STRATOFF equ word ptr 5 ; Strategy Offset
|
||||
;* RH_STRATSEG equ word ptr 7 ; Strategy Segment
|
||||
;* RH_INTERRUPT equ dword ptr 9 ; Device Interrupt Routine
|
||||
;* RH_INTOFF equ word ptr 9 ; Intterupt Offset
|
||||
;* RH_INTSEG equ word ptr 11 ; Interrupt Segment
|
||||
;*****
|
||||
|
||||
; Request header for initialization
|
||||
|
||||
RH0_NUNITS equ byte ptr 13
|
||||
RH0_RESIDENT equ word ptr 14
|
||||
RH0_BPBOFF equ word ptr 18
|
||||
RH0_BPBSEG equ word ptr 20
|
||||
RH0_DRIVE equ byte ptr 22
|
||||
RH0_LEN equ 22
|
||||
|
||||
; Request header for media check
|
||||
|
||||
RH1_MEDIA equ byte ptr 13 ; BDOS: current media byte
|
||||
RH1_RETURN equ byte ptr 14 ; driver: return code (00, 01, FF)
|
||||
RH1_VOLID equ dword ptr 15 ; driver: volume label address
|
||||
RH1_LEN equ 15
|
||||
|
||||
; Request header for "build BPB"
|
||||
|
||||
RH2_MEDIA equ byte ptr 13 ; BDOS or driver?
|
||||
RH2_BUFFER equ dword ptr 14 ; BDOS: scratch buffer for driver use
|
||||
RH2_BPB equ dword ptr 18 ; same as the following:
|
||||
RH2_BPBOFF equ word ptr 18 ; driver: address of new BPB
|
||||
RH2_BPBSEG equ word ptr 20
|
||||
RH2_LEN equ 24
|
||||
|
||||
; Request header for input/output
|
||||
|
||||
RH4_MEDIA equ byte ptr 13 ; BDOS: current media byte
|
||||
RH4_RIC equ byte ptr 13 ; BDOS: Return Interim Char flg
|
||||
RH4_BUFFER equ dword ptr 14 ; BDOS: disk transfer address
|
||||
RH4_BUFOFF equ word ptr 14 ; BDOS: Buffer Offset
|
||||
RH4_BUFSEG equ word ptr 16 ; BDOS: Buffer Segment
|
||||
RH4_COUNT equ word ptr 18 ; BDOS: sector count
|
||||
RH4_SECTOR equ word ptr 20 ; BDOS: starting sector
|
||||
RH4_VOLID equ dword ptr 22 ; driver: volume if illegal disk change
|
||||
RH4_BIGSECTOR equ dword ptr 26
|
||||
RH4_BIGSECTORLO equ word ptr 26
|
||||
RH4_BIGSECTORHI equ word ptr 28
|
||||
|
||||
RH4_LEN equ 30
|
||||
|
||||
; Request Header for Non-Destructive Input
|
||||
|
||||
RH5_CHAR equ byte ptr 13 ; Character Read from Device
|
||||
RH5_RIC equ byte ptr 13 ; BDOS: Return Interim Char flg
|
||||
RH5_LEN equ 14
|
||||
|
||||
; Request Header for Device Open
|
||||
|
||||
RH13_LEN equ 13
|
||||
|
||||
; Request Header for Device Close
|
||||
|
||||
RH14_LEN equ 13
|
||||
|
||||
; Request header for generic IOCTL
|
||||
|
||||
RH19_CATEGORY equ word ptr 13 ; BDOS: major/minor function number
|
||||
RH19_MAJOR equ byte ptr 13 ; BDOS: Major Function Number
|
||||
RH19_MINOR equ byte ptr 14 ; BDOS: Minor Function Number
|
||||
RH19_SI equ word ptr 15 ; BDOS: User SI
|
||||
RH19_DI equ word ptr 17 ; BDOS: User DI
|
||||
RH19_GENPB equ dword ptr 19 ; BDOS: extra parameters
|
||||
RH19_LEN equ 23
|
||||
|
||||
RQ19_SET equ 40h ; set device parameters
|
||||
RQ19_GET equ 60h ; get device parameters
|
||||
RQ19_WRITE equ 41h ; write tracks
|
||||
RQ19_READ equ 61h ; read tracks
|
||||
RQ19_FORMAT equ 42h ; format tracks
|
||||
RQ19_VERIFY equ 62h ; verify tracks
|
||||
RQ19_SETMEDIA equ 46h ; set media ID
|
||||
RQ19_GETMEDIA equ 66h ; get media ID
|
||||
|
||||
RQ19_PRP_START equ 4Ch ; start of codepage prepare
|
||||
RQ19_PRP_END equ 4Dh ; end of codepage prepare
|
||||
RQ19_SELECT equ 4Ah ; select code page
|
||||
RQ19_QRY_SEL equ 6Ah ; query selected code page
|
||||
RQ19_QRY_PRP equ 6Bh ; query prepared code page(s)
|
||||
RQ19_DSP_SET equ 5Fh ; set display information
|
||||
RQ19_DSP_GET equ 7Fh ; get display information
|
||||
|
||||
; Request header for get/set drive
|
||||
|
||||
RH24_CMD equ byte ptr 14 ; BDOS: Command Code
|
||||
RH24_STATUS equ word ptr 15 ; BDOS: Status
|
||||
RH24_RESVD equ dword ptr 17 ; BDOS: Reserved
|
||||
RH24_LEN equ 21
|
||||
|
||||
RH_SIZE equ 30 ; maximum size of request header
|
||||
332
IBMBIO/SERPAR.ASM
Normal file
332
IBMBIO/SERPAR.ASM
Normal file
@@ -0,0 +1,332 @@
|
||||
; File : $Workfile: SERPAR.ASM$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
; SERPAR.ASM 1.7 93/07/22 19:44:27
|
||||
; switch over to REQUEST.EQU
|
||||
; SERPAR.ASM 1.6 93/07/19 18:57:59
|
||||
; Add header
|
||||
;
|
||||
; ENDLOG
|
||||
|
||||
include BIOSGRPS.EQU
|
||||
include DRMACROS.EQU ; standard DR macros
|
||||
include IBMROS.EQU ; ROM BIOS equates
|
||||
include REQUEST.EQU ; request header equates
|
||||
include DRIVER.EQU ; device driver equates
|
||||
|
||||
page
|
||||
CGROUP group CODE, RCODE, ICODE
|
||||
|
||||
CG equ offset CGROUP
|
||||
|
||||
Assume CS:CGROUP, DS:CGROUP, ES:CGROUP, SS:CGROUP
|
||||
|
||||
CODE segment 'CODE'
|
||||
|
||||
extrn endbios:word ; for device driver INIT function
|
||||
extrn serparFlag:byte
|
||||
extrn serparChar:byte
|
||||
|
||||
CODE ends
|
||||
|
||||
RCODE segment 'RCODE'
|
||||
|
||||
Public SerParCommonTable
|
||||
|
||||
SerParCommonTable:
|
||||
db 19 ; Last supported function
|
||||
dw CG:dd_init ; 0-initialize driver
|
||||
dw CG:dd_error ; 1-media change check (disks only)
|
||||
dw CG:dd_error ; 2-build BPB (disks only)
|
||||
dw CG:dd_error ; 3-IOCTL string input
|
||||
dw CG:dd_input ; 4-input
|
||||
dw CG:dd_poll ; 5-nondestructive input (char only)
|
||||
dw CG:dd_instat ; 6-input status (char only)
|
||||
dw CG:dd_inflush ; 7-input flush
|
||||
dw CG:dd_output ; 8-output
|
||||
dw CG:dd_output ; 9-output with verify
|
||||
dw CG:dd_outstat ; 10-output status (char only)
|
||||
dw CG:dd_outflush ; 11-output flush (char only)
|
||||
dw CG:dd_error ; 12-IOCTL string output
|
||||
dw CG:dd_open ; 13-device open
|
||||
dw CG:dd_close ; 14-device close
|
||||
dw CG:dd_error ; 15-removable media check (disks only)
|
||||
dw CG:dd_error ; 16-n/a
|
||||
dw CG:dd_error ; 17-n/a
|
||||
dw CG:dd_error ; 18-n/a
|
||||
dw CG:dd_genioctl ; 19-generic IOCTL
|
||||
|
||||
|
||||
Assume DS:CGROUP, ES:Nothing, SS:Nothing
|
||||
|
||||
page
|
||||
driver proc near
|
||||
|
||||
dd_error: ; used for all unsupported driver functions
|
||||
;--------
|
||||
mov ax,RHS_ERROR+3 ; "invalid command" error
|
||||
ret
|
||||
|
||||
page
|
||||
|
||||
poll_char:
|
||||
;---------
|
||||
; exit: ZF = 1 => no character ready
|
||||
; ZF = 0 => AL = character
|
||||
|
||||
cmp serparFlag[si],TRUE ; do we have local character?
|
||||
jne poll_c2 ; skip if not
|
||||
mov al,serparChar[si] ; get the local charcater
|
||||
jmps poll_c4 ; and return it
|
||||
poll_c2: ; need to check ROS keyboard status
|
||||
mov ah,3 ; get serial status status
|
||||
int ASYNC_INT ; read serial status
|
||||
test ah,1 ; test "received data" bit
|
||||
jz poll_c9 ; skip if no character there
|
||||
mov ah,2 ; read the character
|
||||
int ASYNC_INT ; character returned in AL
|
||||
mov serparChar[si],al ; save it for look ahead
|
||||
mov serparFlag[si],TRUE ; we've got a local character
|
||||
poll_c4: ; return the character in AL
|
||||
or ah,TRUE ; indicate "ready" status
|
||||
ret
|
||||
poll_c9:
|
||||
sub ax,ax ; indicate "not-ready" status
|
||||
ret ; (driver is busy)
|
||||
|
||||
|
||||
char_read:
|
||||
;---------
|
||||
xor ax,ax
|
||||
cmp serparFlag[si],TRUE ; do we have local character?
|
||||
jne rdchr1
|
||||
mov serparFlag[si],FALSE ; tell them buffer is invalid
|
||||
mov al,serparChar[si] ; get the local character
|
||||
ret ; and return it
|
||||
rdchr1:
|
||||
mov ah,2 ; read character from serial port
|
||||
int ASYNC_INT ; call the ROM BIOS
|
||||
and ah,0eh ; only worry about these error bits
|
||||
ret ; and return the character
|
||||
|
||||
page
|
||||
dd_input: ; 4-input
|
||||
;--------
|
||||
push es ; save ES (-> request header!)
|
||||
mov cx,es:RH4_COUNT[bx] ; get # of characters to output
|
||||
jcxz input9 ; return if nothing to input
|
||||
sub dx,3 ; convert to serial port #
|
||||
jb input9 ; return none read if parallel port
|
||||
mov si,dx ; SI = serial port index
|
||||
les di,es:RH4_BUFFER[bx] ; get address of string to input
|
||||
input2:
|
||||
call char_read ; read 8-bit character
|
||||
test ah,ah ; did we read OK ?
|
||||
jnz input9 ; if we have an error stop now
|
||||
stosb ; store it in input buffer
|
||||
loop input2 ; repeat for all characters
|
||||
input9:
|
||||
pop es
|
||||
sub es:RH4_COUNT[bx],cx ; update to actual number xfered
|
||||
sub ax,ax
|
||||
ret
|
||||
|
||||
dd_poll: ; 5-nondestructive input (console only)
|
||||
;-------
|
||||
cmp dx,3 ; check if a parallel port
|
||||
jb poll_busy ; they are never ready
|
||||
sub dx,3
|
||||
mov si,dx ; SI = serial port index
|
||||
call poll_char ; check keyboard status
|
||||
jz poll_busy
|
||||
mov es:RH5_CHAR[bx],al ; return the character
|
||||
sub ax,ax
|
||||
ret
|
||||
poll_busy:
|
||||
mov ax,RHS_BUSY ; indicate no character waiting
|
||||
ret
|
||||
|
||||
dd_instat: ; 6-input status (char only)
|
||||
;---------
|
||||
cmp dx,3 ; check if a parallel port
|
||||
jb poll_busy ; if so it's always busy
|
||||
sub dx,3
|
||||
mov si,dx ; SI = serial port index
|
||||
call poll_char ; check keyboard status
|
||||
jz poll_busy
|
||||
sub ax,ax ; indicate "not ready" status
|
||||
ret
|
||||
|
||||
dd_inflush: ; 7-input flush
|
||||
;---------
|
||||
cmp dx,3 ; check if a parallel port
|
||||
jae inflsh1 ; skip if serial port
|
||||
mov ax,RHS_ERROR+11 ; return "read error" if attempting
|
||||
ret ; to read from the parallel port
|
||||
inflsh1:
|
||||
sub dx,3
|
||||
mov si,dx ; SI = serial port index
|
||||
inflsh2:
|
||||
call poll_char ; check keyboard status
|
||||
jz inflsh_ret ; skip if not ready
|
||||
call char_read ; else read next character
|
||||
jmps inflsh2 ; repeat until buffer empty
|
||||
inflsh_ret: ; keyboard buffer empty
|
||||
sub ax,ax ; return success
|
||||
ret
|
||||
|
||||
dd_output: ; 8-output
|
||||
;---------
|
||||
mov cx,es:RH4_COUNT[bx] ; get # of characters to output
|
||||
jcxz output5 ; return if nothing to output
|
||||
push es ; save ES (-> request header!)
|
||||
les si,es:RH4_BUFFER[bx] ; get address of string to output
|
||||
sub dx,3 ; test if parallel port
|
||||
jae output2 ; skip if serial port
|
||||
add dx,3 ; back to parallel port number
|
||||
output1:
|
||||
lods es:byte ptr [si] ; get next character to output
|
||||
mov ah,0 ; output AL to parallel port
|
||||
int PRINTER_INT ; output to parallel port
|
||||
mov al,2 ; "not ready" error
|
||||
test ah,PRN_TIMEOUT ; printer not ready?
|
||||
jnz output4 ; yes, return error
|
||||
mov al,9 ; "printer out of paper" error
|
||||
test ah,PRN_PAPER ; printer out paper?
|
||||
jnz output4 ; yes, return error
|
||||
inc ax ; "write fault" error
|
||||
test ah,PRN_ERROR ; test if other errors
|
||||
jnz output4 ; skip if any errors occurred
|
||||
loop output1 ; else repeat for all characters
|
||||
jmps output4 ; return successfully when done
|
||||
|
||||
output2: ; output is for serial port
|
||||
lods es:byte ptr [si] ; get next character to output
|
||||
mov ah,1 ; output AL to serial port
|
||||
int ASYNC_INT ; output to serial port
|
||||
mov al,2 ; "not ready" error
|
||||
test ah,AUX_ERROR ; test if time out etc.
|
||||
jnz output4 ; skip if any errors occurred
|
||||
loop output2 ; else repeat for all characters
|
||||
output4:
|
||||
mov ah,RHS_ERROR shr 8 ; assume an error code
|
||||
pop es
|
||||
sub es:RH4_COUNT[bx],cx ; update to actual number xfered
|
||||
jz output6 ; none xfered is an error
|
||||
output5:
|
||||
sub ax,ax ; return successfully when done
|
||||
output6:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
dd_outstat: ; 10-output status (char only)
|
||||
;----------
|
||||
cmp dx,3 ; test if parallel port
|
||||
jae outstat1
|
||||
mov ah,2 ; read parallel port status
|
||||
int PRINTER_INT ; call the ROM BIOS
|
||||
test ah,80h ; test "not busy" bit
|
||||
jnz outstat_ready ; if not busy then ready for output
|
||||
jmps outstat_busy ; else we must be still busy
|
||||
outstat1:
|
||||
sub dx,3
|
||||
mov ah,3 ; get status for serial port
|
||||
int ASYNC_INT
|
||||
test ah,20h ; transmit buffer register emmpty?
|
||||
jz outstat_busy
|
||||
test al,20h ; data set ready?
|
||||
jz outstat_busy
|
||||
outstat_ready:
|
||||
sub ax,ax ; always ready, return no busy
|
||||
ret
|
||||
outstat_busy:
|
||||
mov ax,RHS_BUSY
|
||||
ret
|
||||
|
||||
dd_outflush: ; 11-output flush (char only)
|
||||
;-----------
|
||||
sub ax,ax ; unbuffered, perform no operation
|
||||
ret
|
||||
|
||||
|
||||
page
|
||||
dd_open: ; 13-device open
|
||||
;-------
|
||||
sub ax,ax ; no operation
|
||||
ret
|
||||
|
||||
|
||||
dd_close: ; 14-device close
|
||||
;--------
|
||||
sub ax,ax ; no operation
|
||||
ret
|
||||
|
||||
|
||||
page
|
||||
dd_genioctl: ; 19-generic IOCTL
|
||||
;-----------
|
||||
sub ax,ax
|
||||
ret
|
||||
|
||||
driver endp
|
||||
|
||||
RCODE ends ; end of device driver code
|
||||
|
||||
page
|
||||
|
||||
ICODE segment 'ICODE' ; initialization code
|
||||
|
||||
dd_init: ; 0-initialize driver
|
||||
;-------
|
||||
cmp dx,3 ; check if serial or parallel
|
||||
jae init1 ; skip if serial port setup
|
||||
mov ah,1 ; initialize parallel port
|
||||
int PRINTER_INT ; call the ROM BIOS
|
||||
jmps init2
|
||||
init1:
|
||||
sub dx,3
|
||||
mov ah,0 ; initialize serial port
|
||||
mov al,0A3h ; 2400 Bd, no parity, 8 data, 1 stop
|
||||
int ASYNC_INT ; call the ROM BIOS
|
||||
init2:
|
||||
les bx,REQUEST[bp] ; ES:BX -> request header
|
||||
|
||||
mov ax,endbios
|
||||
mov es:RH0_RESIDENT[bx],ax ; set end of device driver
|
||||
mov es:RH0_RESIDENT+2[bx],ds
|
||||
|
||||
sub ax,ax ; initialization succeeded
|
||||
ret ; (BIOS init always does...)
|
||||
|
||||
ICODE ends
|
||||
|
||||
end
|
||||
365
IBMBIO/STACKS.ASM
Normal file
365
IBMBIO/STACKS.ASM
Normal file
@@ -0,0 +1,365 @@
|
||||
; File : $STACKS.ASM$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
; STACKS.ASM 1.6 93/10/26 19:08:13
|
||||
; Fix bug when we run out of stacks
|
||||
; STACKS.ASM 1.4 93/09/02 22:36:47
|
||||
; Add header to system allocations
|
||||
; ENDLOG
|
||||
|
||||
CGROUP group INITCODE, STACKS
|
||||
|
||||
STACKS segment public para 'STACKS'
|
||||
|
||||
Assume CS:STACKS, DS:Nothing, ES:Nothing, SS:Nothing
|
||||
|
||||
StackCode:
|
||||
|
||||
;************
|
||||
; FIXED DATA
|
||||
;************
|
||||
|
||||
dw 0
|
||||
NumOfStacks dw 0 ; we have this many stacks
|
||||
StackCB dw 0 ; NumOfStacks*8 = size of control array
|
||||
StackSize dw 0 ; size of an individual stack
|
||||
StackPtr label dword ; pointer to stack data
|
||||
StackOff dw offset STACKS:StackHeap
|
||||
StackSeg dw 0
|
||||
FirstStack dw offset STACKS:StackHeap
|
||||
LastStack dw offset STACKS:StackHeap-STACK_CB_SIZE
|
||||
NextStack dw offset STACKS:StackHeap-STACK_CB_SIZE
|
||||
|
||||
;************
|
||||
; FIXED DATA
|
||||
;************
|
||||
|
||||
STACK_CB_FLAGS equ word ptr 0 ; stack flags
|
||||
STACK_CB_SP equ word ptr 2 ; old stack saved here
|
||||
STACK_CB_SS equ word ptr 4
|
||||
STACK_CB_TOP equ word ptr 6 ; stack top lives here
|
||||
STACK_CB_SIZE equ 8
|
||||
|
||||
STACK_FREE equ 0 ; stack is available to allocate
|
||||
STACK_INUSE equ 1 ; stack is in use
|
||||
STACK_OVERFLOW equ 2 ; stack has overflowed
|
||||
|
||||
;
|
||||
; Our hardware interrupt handlers which are of the form
|
||||
;
|
||||
; call SwapStack
|
||||
; db 0EAh ; JMPF opcode
|
||||
; dd oldIntHandler
|
||||
;
|
||||
; By looking at the near return address we can find the address of the old
|
||||
; interrupt handler.
|
||||
; We try to allocate a stack from our pool of stacks, working downward to
|
||||
; reduce the problems of stack overflow.
|
||||
;
|
||||
; We check the top of the stack contains a pointer to our control block and
|
||||
; if this is invalid we assume the stack has overflowed, and try the next one.
|
||||
; We have no way of recovering a stack that has overflowed (eg. by zapping
|
||||
; everything below us on exit).
|
||||
;
|
||||
; If we run out of stacks we just continue on the callers stack, rather than
|
||||
; halting the system.
|
||||
;
|
||||
|
||||
Int02:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i02Off dw 4*02h,0
|
||||
|
||||
Int08:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i08Off dw 4*08h,0
|
||||
|
||||
Int09:
|
||||
call SwapStack
|
||||
db 0EAh
|
||||
i09Off dw 4*09h,0
|
||||
|
||||
Int0A:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i0AOff dw 4*0Ah,0
|
||||
|
||||
Int0B:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i0BOff dw 4*0Bh,0
|
||||
|
||||
Int0C:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i0COff dw 4*0Ch,0
|
||||
|
||||
Int0D:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i0DOff dw 4*0Dh,0
|
||||
|
||||
Int0E:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i0EOff dw 4*0Eh,0
|
||||
|
||||
Int70:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i70Off dw 4*70h,0
|
||||
|
||||
Int72:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i72Off dw 4*72h,0
|
||||
|
||||
Int73:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i73Off dw 4*73h,0
|
||||
|
||||
Int74:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i74Off dw 4*74h,0
|
||||
|
||||
Int76:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i76Off dw 4*76h,0
|
||||
|
||||
Int77:
|
||||
call SwapStack
|
||||
db 0EAh ; JMPF
|
||||
i77Off dw 4*77h,0
|
||||
|
||||
SwapStack proc near
|
||||
; On Entry:
|
||||
; As per INT except word on stack from near call, which gives old vector
|
||||
; On Exit:
|
||||
; None
|
||||
;
|
||||
cli ; just in case
|
||||
push bp
|
||||
push si ; save work registers
|
||||
mov si,cs:NextStack ; start looking here for a stack
|
||||
SwapStack10:
|
||||
cmp cs:STACK_CB_FLAGS[si],STACK_FREE
|
||||
jne SwapStack20 ; use this stack if possible
|
||||
mov bp,cs:STACK_CB_TOP[si] ; get the top of this stack
|
||||
cmp si,cs:word ptr [bp] ; does the check match ?
|
||||
jne SwapStack20 ; no, try the next one
|
||||
mov cs:NextStack,si ; remember where we are
|
||||
mov cs:STACK_CB_FLAGS[si],STACK_INUSE
|
||||
mov cs:STACK_CB_SS[si],ss ; save old stack
|
||||
mov cs:STACK_CB_SP[si],sp
|
||||
|
||||
mov bp,sp
|
||||
xchg bx,ss:word ptr 4[bp] ; BX = return address, BX saved
|
||||
|
||||
mov bp,cs
|
||||
mov ss,bp
|
||||
mov sp,cs:STACK_CB_TOP[si] ; switch stacks
|
||||
pushf
|
||||
call cs:dword ptr 1[bx] ; fake an INT to old handler
|
||||
mov ss,cs:STACK_CB_SS[si]
|
||||
mov sp,cs:STACK_CB_SP[si] ; swap back to the original stack
|
||||
mov cs:STACK_CB_FLAGS[si],STACK_FREE
|
||||
mov cs:NextStack,si ; update in case we were nested
|
||||
pop si ; restore registers
|
||||
pop bp
|
||||
pop bx ; (was return address, now saved BX)
|
||||
iret ; exit interrupt handler
|
||||
|
||||
SwapStack20:
|
||||
sub si,STACK_CB_SIZE ; it's not, so try the next
|
||||
cmp si,cs:FirstStack ; if there is one
|
||||
jae SwapStack10
|
||||
pop si ; restore registers
|
||||
pop bp
|
||||
ret ; back to JMPF as we can't swap stacks
|
||||
|
||||
SwapStack endp
|
||||
|
||||
i19Table dw 4*02H, offset STACKS:i02Off
|
||||
dw 4*08H, offset STACKS:i08Off
|
||||
dw 4*09H, offset STACKS:i09Off
|
||||
dw 4*0AH, offset STACKS:i0AOff
|
||||
dw 4*0BH, offset STACKS:i0BOff
|
||||
dw 4*0CH, offset STACKS:i0COff
|
||||
dw 4*0DH, offset STACKS:i0DOff
|
||||
dw 4*0EH, offset STACKS:i0EOff
|
||||
dw 4*70H, offset STACKS:i70Off
|
||||
dw 4*72H, offset STACKS:i72Off
|
||||
dw 4*73H, offset STACKS:i73Off
|
||||
dw 4*74H, offset STACKS:i74Off
|
||||
dw 4*76H, offset STACKS:i76Off
|
||||
dw 4*77H, offset STACKS:i77Off
|
||||
dw 0
|
||||
|
||||
Int19:
|
||||
; Trap the Int 19 reboot and restore any hardware vectors we have hooked
|
||||
cli
|
||||
cld
|
||||
xor ax,ax
|
||||
mov es,ax ; ES = interrupt vectors
|
||||
push cs
|
||||
pop ds
|
||||
lea si,i19Table ; DS:SI -> table to restore
|
||||
Int1910:
|
||||
lodsw
|
||||
xchg ax,di ; ES:DI -> address to restore to
|
||||
lodsw
|
||||
xchg ax,si ; CS:SI -> value to restore
|
||||
movsw
|
||||
movsw
|
||||
xchg ax,si ; restore position in table
|
||||
cmp ds:word ptr [si],0
|
||||
jne Int1910
|
||||
db 0EAh ; JMPF
|
||||
i19Off dw 4*19h,0
|
||||
|
||||
even ; word align our stacks
|
||||
|
||||
StackHeap label word ; dynamically build stack CB's here
|
||||
|
||||
RELOCATE_SIZE equ ($ - StackCode)
|
||||
|
||||
STACKS ends
|
||||
|
||||
INITCODE segment public para 'INITCODE'
|
||||
|
||||
Assume CS:CGROUP, DS:CGROUP, ES:Nothing, SS:Nothing
|
||||
|
||||
extrn alloc_hiseg:near
|
||||
|
||||
Public InitStacks
|
||||
;==========
|
||||
InitStacks:
|
||||
;==========
|
||||
; On Entry:
|
||||
; CX = number of stacks
|
||||
; DX = size of stack
|
||||
; Values are checked
|
||||
; On Exit:
|
||||
; None
|
||||
;
|
||||
push ds
|
||||
push es
|
||||
inc dx ; let's ensure stacks are WORD
|
||||
and dx,0FFFEh ; aligned...
|
||||
mov NumOfStacks,cx
|
||||
mov StackSize,dx
|
||||
mov ax,STACK_CB_SIZE
|
||||
mul cx ; AX = bytes in control area
|
||||
mov StackCB,ax
|
||||
add LastStack,ax
|
||||
add NextStack,ax
|
||||
add StackOff,ax ; adjust our pointers
|
||||
xchg ax,cx ; AX = NumOfStacks
|
||||
mul StackSize ; AX bytes are required for stacks
|
||||
add ax,StackOff ; add to start of stacks
|
||||
push ax ; save length in bytes
|
||||
add ax,15 ; allow for rounding
|
||||
mov cl,4
|
||||
shr ax,cl ; convert it to para's
|
||||
mov dl,'S' ; allocation signature is Stacks
|
||||
call alloc_hiseg ; allocate some memory
|
||||
pop cx ; CX = length in bytes
|
||||
mov StackSeg,ax ; remember where
|
||||
mov es,ax
|
||||
Assume ES:STACKS
|
||||
xor di,di
|
||||
mov al,0CCh ; fill stacks with CC for debug
|
||||
rep stosb
|
||||
xor di,di
|
||||
mov si,offset CGROUP:StackCode
|
||||
mov cx,RELOCATE_SIZE
|
||||
rep movsb ; relocate the code
|
||||
|
||||
mov bx,FirstStack ; lets start building the CB's
|
||||
mov cx,NumOfStacks
|
||||
lds si,StackPtr ; SI = bottom of stack area
|
||||
Assume DS:STACKS
|
||||
sub si,WORD ; we want the word below top of stack
|
||||
InitStacks10:
|
||||
add si,StackSize ; SI = top of stack
|
||||
mov ds:STACK_CB_FLAGS[bx],STACK_FREE
|
||||
mov ds:STACK_CB_TOP[bx],si ; set top of stack
|
||||
mov ds:word ptr [si],bx ; set backlink
|
||||
add bx,STACK_CB_SIZE ; onto next control block
|
||||
loop InitStacks10
|
||||
|
||||
xor ax,ax
|
||||
mov ds,ax
|
||||
Assume DS:Nothing
|
||||
cli
|
||||
mov si,offset CGROUP:iTable ; now we fixup the vectors
|
||||
InitStacks20:
|
||||
mov ax,cs:word ptr 0[si] ; ES:AX = entry point
|
||||
mov di,cs:word ptr 2[si] ; ES:DI = fixup location
|
||||
mov bx,es:word ptr [di] ; get the vector to fixup
|
||||
xchg ax,ds:word ptr [bx] ; set entry offset while saving
|
||||
stosw ; previous handler offset
|
||||
mov ax,es
|
||||
xchg ax,ds:word ptr 2[bx] ; now the segment
|
||||
stosw
|
||||
add si,2*WORD ; onto next entry
|
||||
cmp cs:word ptr 0[si],0 ; (zero terminated)
|
||||
jnz InitStacks20
|
||||
sti
|
||||
InitStacks30:
|
||||
pop es
|
||||
pop ds
|
||||
ret
|
||||
|
||||
iTable dw offset STACKS:Int02, offset STACKS:i02Off
|
||||
dw offset STACKS:Int08, offset STACKS:i08Off
|
||||
dw offset STACKS:Int09, offset STACKS:i09Off
|
||||
dw offset STACKS:Int0A, offset STACKS:i0AOff
|
||||
dw offset STACKS:Int0B, offset STACKS:i0BOff
|
||||
dw offset STACKS:Int0C, offset STACKS:i0COff
|
||||
dw offset STACKS:Int0D, offset STACKS:i0DOff
|
||||
dw offset STACKS:Int0E, offset STACKS:i0EOff
|
||||
dw offset STACKS:Int70, offset STACKS:i70Off
|
||||
dw offset STACKS:Int72, offset STACKS:i72Off
|
||||
dw offset STACKS:Int73, offset STACKS:i73Off
|
||||
dw offset STACKS:Int74, offset STACKS:i74Off
|
||||
dw offset STACKS:Int76, offset STACKS:i76Off
|
||||
dw offset STACKS:Int77, offset STACKS:i77Off
|
||||
dw offset STACKS:Int19, offset STACKS:i19Off
|
||||
dw 0
|
||||
|
||||
INITCODE ends
|
||||
|
||||
end
|
||||
64
IBMBIO/UDSC.EQU
Normal file
64
IBMBIO/UDSC.EQU
Normal file
@@ -0,0 +1,64 @@
|
||||
; File : $UDSC.EQU$
|
||||
;
|
||||
; Description :
|
||||
;
|
||||
; Original Author : DIGITAL RESEARCH
|
||||
;
|
||||
; Last Edited By : $CALDERA$
|
||||
;
|
||||
;-----------------------------------------------------------------------;
|
||||
; Copyright Work of Caldera, Inc. All Rights Reserved.
|
||||
;
|
||||
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
|
||||
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
|
||||
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
|
||||
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
|
||||
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
|
||||
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
|
||||
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
|
||||
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
|
||||
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
|
||||
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
|
||||
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
|
||||
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
|
||||
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
|
||||
; CIVIL LIABILITY.
|
||||
;-----------------------------------------------------------------------;
|
||||
;
|
||||
; *** Current Edit History ***
|
||||
; *** End of Current Edit History ***
|
||||
;
|
||||
; $Log$
|
||||
; ENDLOG
|
||||
|
||||
|
||||
UDSC_BPB_LENGTH equ 25
|
||||
|
||||
UDSC struc
|
||||
UDSC_NEXT dd ? ; link to next UDSC_
|
||||
UDSC_RUNIT db ? ; ROS drive number (0/1/80/81)
|
||||
UDSC_DRIVE db ? ; logical drive
|
||||
UDSC_BPB db UDSC_BPB_LENGTH dup (?) ; current BPB
|
||||
UDSC_FATFLAG db ?
|
||||
UDSC_OPNCNT dw ? ; # of files open on drive
|
||||
UDSC_TYPE db ? ; floppy drive type (0/1/2/7)
|
||||
UDSC_FLAGS dw ? ; various flags for drive
|
||||
UDSC_NCYL dw ? ; # of cylinders per drive
|
||||
UDSC_DEVBPB db UDSC_BPB_LENGTH dup (?) ; device BPB
|
||||
db 7 dup (?)
|
||||
UDSC_TIMER dw 2 dup (?) ; tick count for MEDCHK
|
||||
UDSC_LABEL db 12 dup (?) ; ASCIIZ volume label
|
||||
UDSC_SERIAL dd ? ; serial number
|
||||
UDSC_FSTYPE db 9 dup (?) ; ASCIIZ "FAT12"/"FAT16" type
|
||||
UDSC ends
|
||||
|
||||
UDSC_LENGTH equ size UDSC
|
||||
|
||||
UDF_HARD equ 0001h ; drive is a hard disk
|
||||
UDF_CHGLINE equ 0002h ; drive support disk change line
|
||||
UDF_UNSURE equ 0004h ; drive has just been formatted
|
||||
UDF_VFLOPPY equ 0010h ; drive shares physical drive
|
||||
UDF_OWNER equ 0020h ; logical drive "owns" physical drive
|
||||
UDF_MEDIA equ 0100h ; media id is from bootsec, not default
|
||||
|
||||
MAXPART equ 26 ; support up 26 drives
|
||||
Reference in New Issue
Block a user