home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix CD 2.0
/
Phoenix_CD.cdr
/
24b
/
hot.zip
/
HOT.ASM
next >
Wrap
Assembly Source File
|
1986-12-31
|
1KB
|
104 lines
PROG SEGMENT WORD PUBLIC 'PROG'
ASSUME DS:PROG,CS:PROG
org 0
db 100h dup (?)
tsr: jmp gostrt
icopy db 400h dup (?)
oldkey dw 0,0
blksiz dw 0
blkadr dw 0
;;;;;
gokey: pop ds
pop ax
jmp cs:dword ptr oldkey
mykey: push ax
push ds
mov ax,40h
mov ds,ax
mov al,ds:byte ptr 17h
and al,0ch
cmp al,0ch
jne gokey
in al,60h
and al,7fh
cmp al,82 ; INS key
jne gokey
; yes, eat the key
in al,61h
mov ah,al
or al,80h
out 61h,al
xchg ah,al
out 61h,al
mov al,20h ; non-specific EOI for 8259
out 20h,al
; do the HOT-BOOT
mov ax,cs
mov ds,ax
mov ax,blkadr
mov es,ax
mov di,0
cld
mov al,5ah
stosb
mov ax,0
stosw
mov ax,blksiz
stosw
sub ax,ax
mov es,ax
mov ax,cs
mov ds,ax
mov si,offset icopy
mov di,0
mov cx,200h
rep movsw
mov bx,cs
mov ah,50h ; set psp
int 21h
mov ax,4c00h
int 21h
gostrt:
sub ax,ax
mov ds,ax
mov cx,200h
cld
mov si,ax
mov di,offset icopy
rep movsw
;
mov ax,cs
mov ds,ax
mov ax,3509h ; get int 9
int 21h
mov oldkey,bx
mov oldkey+2,es
mov ax,2509h
mov dx,offset mykey
int 21h
mov ax,cs
mov es,ax
mov bx,offset endpgm
add bx,15
mov cl,4
shr bx,cl
mov dx,bx
mov ax,cs
add ax,dx
mov blkadr,ax
mov ah,4ah
int 21h
mov bx,0ffffh
mov ah,48h ; how much is there ?
int 21h
mov blksiz,bx
mov ax,3100h
int 21h
endpgm equ $
PROG ends
end tsr