home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 mARCH
/
PCWK3A99.iso
/
Archiwiz
/
Tar320
/
SOURCES.ZIP
/
PCLEVEL.ASM
< prev
next >
Wrap
Assembly Source File
|
1994-08-25
|
2KB
|
97 lines
include farnear.inc
_TEXT segment byte public 'CODE'
assume cs:_TEXT
program _getkey
; int getkey(void)
l1: mov ah,1
int 16h
mov ah,0
jz short l2
int 16h
jmp short l1
l2: int 16h
xor ah,ah
ret
_getkey endp
program _diskserv
; int diskserv(int op, int drive, int head, int track, int sector,
; int nsects, void far *buffer)
push bp
mov bp,sp
mov ah,arglist[0] ; operation
mov al,arglist[10] ; number of sectors
mov cx,arglist[6] ; track number
; and ch,3 ; must not need for valid number
ror ch,1
ror ch,1
xchg ch,cl
; mov dl,arglist[8] ; sector number
; and dl,3fh ; must not need for valid number
; or cl,dl
or cl,arglist[8] ; sector number
mov dl,arglist[2] ; drive number
mov dh,arglist[4] ; head number
les bx,arglist[12] ; buffer address
int 13h
jc short end
xor ah,ah
end:
mov al,ah
xor ah,ah
pop bp
ret
_diskserv endp
program _diskspec
; void far *diskspec(int op, int drive, int head, int track,
; int nsects, struct BYTEREGS far *xregs)
push bp
mov bp,sp
push di
mov ah,arglist[0] ; operation
mov cx,arglist[6] ; track number
; and ch,3 ; must not need for valid number
ror ch,1
ror ch,1
xchg ch,cl
; mov dl,arglist[8] ; last sector on a track
; and dl,3fh ; must not need for valid number
; or cl,dl
or cl,arglist[8] ; last sector on a track
mov dl,arglist[2] ; drive number
mov dh,arglist[4] ; head number
xor di,di ; default pointer
mov es,di ; = NULL
int 13h
push ds
push si
lds si,arglist[10] ; output buffer
mov [si+0],ax
mov [si+2],bx
mov [si+4],cx
mov [si+6],dx
pop si
pop ds
mov ax,di
mov dx,es
pop di
pop bp
ret
_diskspec endp
_TEXT ends
end