2001-02-03 21:48:09 +01:00
|
|
|
|
.model tiny
|
|
|
|
|
.386c
|
|
|
|
|
.code
|
|
|
|
|
org 0100h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
start:
|
|
|
|
|
mov ax,0305h
|
|
|
|
|
mov bx,0008h
|
2001-02-04 21:48:09 +01:00
|
|
|
|
int 16h
|
|
|
|
|
mov ax,0002
|
|
|
|
|
int 47H
|
|
|
|
|
mov ah,26
|
|
|
|
|
int 47H
|
|
|
|
|
mov ah,2
|
|
|
|
|
int 47h
|
2001-02-18 21:48:09 +01:00
|
|
|
|
xor ebp,ebp
|
|
|
|
|
xor ax,ax
|
|
|
|
|
mov fs,ax
|
2001-02-03 21:48:09 +01:00
|
|
|
|
Adres:
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov di,offset infos
|
|
|
|
|
mov ah,34
|
|
|
|
|
int 47h
|
|
|
|
|
dec infos
|
2001-02-25 21:48:09 +01:00
|
|
|
|
mov al,[di+7]
|
|
|
|
|
cmp al,oldmode
|
|
|
|
|
je noinit
|
|
|
|
|
mov ah,2
|
|
|
|
|
int 47h
|
|
|
|
|
mov oldmode,al
|
|
|
|
|
noinit:
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov bx,0
|
|
|
|
|
mov ah,25
|
|
|
|
|
int 47h
|
|
|
|
|
mov bh,infos
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov edi,ebp
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,21
|
|
|
|
|
mov cl,7
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
lines:
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov edx,edi
|
|
|
|
|
shr edx,4*4
|
|
|
|
|
shl edx,4*3
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov cx,16
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,10
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov si,offset dep
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,13
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov dx,di
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,10
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,13
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov si,offset spaces
|
2001-02-04 21:48:09 +01:00
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov al,16
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov cl,7
|
|
|
|
|
mov ah,21
|
|
|
|
|
int 47h
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov esi,edi
|
2001-02-03 21:48:09 +01:00
|
|
|
|
doaline:
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov edx,edi
|
|
|
|
|
shr edx,4*4
|
|
|
|
|
shl edx,4*3
|
|
|
|
|
mov fs,dx
|
|
|
|
|
mov dl,fs:[di]
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,10
|
|
|
|
|
mov cl,8
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,5
|
|
|
|
|
int 47h
|
2001-02-18 21:48:09 +01:00
|
|
|
|
inc edi
|
2001-02-03 21:48:09 +01:00
|
|
|
|
dec al
|
|
|
|
|
jnz doaline
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov edi,esi
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov si,offset spaces
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,13
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov al,16
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,21
|
|
|
|
|
mov cl,7
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
doaline2:
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov edx,edi
|
|
|
|
|
shr edx,4*4
|
|
|
|
|
shl edx,4*3
|
|
|
|
|
mov fs,dx
|
|
|
|
|
mov dl,fs:[di]
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,7
|
|
|
|
|
int 47h
|
2001-02-18 21:48:09 +01:00
|
|
|
|
inc edi
|
2001-02-03 21:48:09 +01:00
|
|
|
|
dec al
|
|
|
|
|
jnz doaline2
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,6
|
|
|
|
|
int 47h
|
|
|
|
|
dec bh
|
2001-02-03 21:48:09 +01:00
|
|
|
|
jnz lines
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,21
|
|
|
|
|
mov cl,112
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov si,offset menu
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,13
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
waitkey:
|
|
|
|
|
mov ax,0
|
|
|
|
|
int 16h
|
|
|
|
|
cmp ax,3B00h
|
|
|
|
|
jne suit
|
2001-02-18 21:48:09 +01:00
|
|
|
|
inc ebp
|
|
|
|
|
jmp adres
|
2001-02-03 21:48:09 +01:00
|
|
|
|
suit:
|
|
|
|
|
cmp ax,3C00h
|
|
|
|
|
jne suit2
|
2001-02-18 21:48:09 +01:00
|
|
|
|
dec ebp
|
|
|
|
|
jmp adres
|
2001-02-03 21:48:09 +01:00
|
|
|
|
suit2:
|
|
|
|
|
cmp ax,3D00h
|
|
|
|
|
jne suit3
|
2001-02-18 21:48:09 +01:00
|
|
|
|
add ebp,24*16
|
2001-02-03 21:48:09 +01:00
|
|
|
|
jmp adres
|
|
|
|
|
suit3:
|
|
|
|
|
cmp ax,3E00h
|
|
|
|
|
jne suit4
|
2001-02-18 21:48:09 +01:00
|
|
|
|
sub ebp,24*16
|
2001-02-03 21:48:09 +01:00
|
|
|
|
jmp adres
|
|
|
|
|
suit4:
|
|
|
|
|
cmp ax,3F00h
|
|
|
|
|
jne suit5
|
2001-02-18 21:48:09 +01:00
|
|
|
|
add ebp,010000h
|
|
|
|
|
jmp adres
|
2001-02-03 21:48:09 +01:00
|
|
|
|
suit5:
|
|
|
|
|
cmp ax,4000h
|
|
|
|
|
jne suit6
|
2001-02-18 21:48:09 +01:00
|
|
|
|
sub ebp,010000h
|
|
|
|
|
jmp adres
|
2001-02-03 21:48:09 +01:00
|
|
|
|
suit6:
|
|
|
|
|
cmp ax,4100h
|
|
|
|
|
jne suit7
|
|
|
|
|
mov dword ptr [pope],'TIDE'
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov bl,infos
|
|
|
|
|
xor bh,bh
|
|
|
|
|
mov ah,25
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,21
|
|
|
|
|
mov cl,116
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov si,offset menu
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,13
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,21
|
|
|
|
|
mov cl,7
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov ax,0B800h
|
|
|
|
|
mov es,ax
|
|
|
|
|
mov xxyy2,3
|
|
|
|
|
mov xxyy,3
|
|
|
|
|
call calc1
|
|
|
|
|
call calc2
|
|
|
|
|
waitst:
|
|
|
|
|
mov ax,0
|
|
|
|
|
int 16h
|
|
|
|
|
cmp ah,41h
|
|
|
|
|
jne tre
|
|
|
|
|
mov dword ptr [pope],' EUV'
|
|
|
|
|
push cs
|
|
|
|
|
pop es
|
2001-02-18 21:48:09 +01:00
|
|
|
|
jmp adres
|
2001-02-03 21:48:09 +01:00
|
|
|
|
tre:
|
|
|
|
|
cmp al,0
|
|
|
|
|
jne write
|
|
|
|
|
cmp ah,48h
|
|
|
|
|
jne tre1
|
|
|
|
|
cmp yy,0
|
|
|
|
|
je waitst
|
|
|
|
|
dec yy
|
|
|
|
|
jmp cursor
|
|
|
|
|
tre1:
|
|
|
|
|
cmp ah,50h
|
|
|
|
|
jne tre2
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov al,infos
|
|
|
|
|
dec al
|
|
|
|
|
xor ah,ah
|
|
|
|
|
cmp yy,ax
|
2001-02-03 21:48:09 +01:00
|
|
|
|
je waitst
|
|
|
|
|
inc yy
|
|
|
|
|
jmp cursor
|
|
|
|
|
tre2:
|
|
|
|
|
cmp ah,4Dh
|
|
|
|
|
jne tre4
|
|
|
|
|
cmp xx,15
|
|
|
|
|
je waitst
|
|
|
|
|
inc xx
|
|
|
|
|
jmp cursor
|
|
|
|
|
tre4:
|
|
|
|
|
cmp ah,4Bh
|
|
|
|
|
jne waitst
|
|
|
|
|
cmp xx,0
|
|
|
|
|
je waitst
|
|
|
|
|
dec xx
|
|
|
|
|
jmp cursor
|
|
|
|
|
write:
|
|
|
|
|
call AsciiHex2dec
|
|
|
|
|
cmp cl,15
|
|
|
|
|
ja waitst
|
|
|
|
|
call calc1
|
2001-02-18 21:48:09 +01:00
|
|
|
|
call calc2
|
|
|
|
|
mov edi,es:[bx-1]
|
|
|
|
|
mov dx,es:[si-1]
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov byte ptr es:[bx],0112
|
|
|
|
|
mov es:[bx-1],al
|
|
|
|
|
writs:
|
|
|
|
|
mov ax,0
|
|
|
|
|
int 16H
|
|
|
|
|
mov ch,cl
|
|
|
|
|
call AsciiHex2dec
|
|
|
|
|
cmp cl,15
|
|
|
|
|
ja writs
|
|
|
|
|
shl ch,4
|
|
|
|
|
add ch,cl
|
|
|
|
|
mov es:[bx+1],al
|
|
|
|
|
mov es:[si-1],ch
|
|
|
|
|
mov ax,bx
|
|
|
|
|
call calc3
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov gs:[bx],ch
|
|
|
|
|
pusha
|
|
|
|
|
popa
|
|
|
|
|
mov cl,gs:[bx]
|
|
|
|
|
cmp ch,cl
|
|
|
|
|
je no
|
|
|
|
|
push si ax
|
|
|
|
|
mov ah,25
|
|
|
|
|
mov bl,infos
|
|
|
|
|
xor bh,bh
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,21
|
|
|
|
|
mov cl,117
|
|
|
|
|
int 47h
|
|
|
|
|
mov si,offset msg
|
|
|
|
|
mov ah,13
|
|
|
|
|
int 47h
|
|
|
|
|
mov ax,0
|
|
|
|
|
int 16h
|
|
|
|
|
mov bl,infos
|
|
|
|
|
xor bh,bh
|
|
|
|
|
mov ah,25
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,21
|
|
|
|
|
mov cl,116
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,13
|
|
|
|
|
mov si,offset menu
|
|
|
|
|
int 47h
|
|
|
|
|
pop bx si
|
|
|
|
|
mov es:[bx-1],edi
|
|
|
|
|
mov es:[si-1],dx
|
|
|
|
|
no:
|
|
|
|
|
|
2001-02-03 21:48:09 +01:00
|
|
|
|
inc xx
|
|
|
|
|
cmp xx,16
|
|
|
|
|
jne pasde
|
|
|
|
|
inc yy
|
|
|
|
|
mov xx,0h
|
|
|
|
|
pasde:
|
|
|
|
|
call calc1
|
|
|
|
|
call calc2
|
|
|
|
|
jmp waitst
|
|
|
|
|
|
|
|
|
|
cursor:
|
|
|
|
|
call calc1
|
|
|
|
|
call calc2
|
|
|
|
|
jmp waitst
|
|
|
|
|
suit7:
|
|
|
|
|
cmp ax,4200h
|
|
|
|
|
jne waitkey
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,27
|
|
|
|
|
int 47h
|
2001-02-18 21:48:09 +01:00
|
|
|
|
db 0CBH ; +++++++
|
2001-02-03 21:48:09 +01:00
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
calc1:
|
|
|
|
|
push ax dx si
|
|
|
|
|
mov ax,xx
|
|
|
|
|
mov dx,xx
|
|
|
|
|
shl ax,2
|
|
|
|
|
shl dx,1
|
|
|
|
|
add ax,dx
|
|
|
|
|
add ax,25
|
|
|
|
|
mov bx,YY
|
|
|
|
|
mov dx,yy
|
|
|
|
|
shl bx,5
|
|
|
|
|
shl dx,7
|
|
|
|
|
add bx,dx
|
|
|
|
|
add bx,ax
|
|
|
|
|
mov byte ptr es:[bx],112
|
|
|
|
|
mov byte ptr es:[bx+2],112
|
|
|
|
|
mov si,xxyy
|
|
|
|
|
mov byte ptr es:[si],07
|
|
|
|
|
mov byte ptr es:[si+2],07
|
|
|
|
|
mov xxyy,bx
|
|
|
|
|
pop si dx ax
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
calc2:
|
|
|
|
|
push ax bx dx
|
|
|
|
|
mov si,YY
|
|
|
|
|
mov dx,yy
|
|
|
|
|
shl si,5
|
|
|
|
|
shl dx,7
|
|
|
|
|
add si,dx
|
|
|
|
|
mov dx,xx
|
|
|
|
|
shl dx,1
|
|
|
|
|
add si,dx
|
|
|
|
|
add si,127
|
|
|
|
|
mov byte ptr es:[si],112
|
|
|
|
|
mov bx,xxyy2
|
|
|
|
|
mov byte ptr es:[bx],07
|
|
|
|
|
mov xxyy2,si
|
|
|
|
|
pop dx bx ax
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
calc3:
|
|
|
|
|
push dx
|
2001-02-18 21:48:09 +01:00
|
|
|
|
xor ebx,ebx
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov bx,xx
|
|
|
|
|
mov dx,yy
|
|
|
|
|
shl dx,4
|
|
|
|
|
add bx,dx
|
2001-02-18 21:48:09 +01:00
|
|
|
|
add ebx,ebp
|
|
|
|
|
mov edx,ebx
|
|
|
|
|
shr edx,4*4
|
|
|
|
|
shl edx,4*3
|
|
|
|
|
mov gs,dx
|
2001-02-03 21:48:09 +01:00
|
|
|
|
pop dx
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
asciihex2dec:
|
|
|
|
|
cmp al,'a'
|
|
|
|
|
jb nomin
|
|
|
|
|
cmp al,'f'
|
|
|
|
|
ja nomin
|
|
|
|
|
sub al,'a'-'A'
|
|
|
|
|
jmp ismaj
|
|
|
|
|
nomin:
|
|
|
|
|
cmp al,'A'
|
|
|
|
|
jb nomaj
|
|
|
|
|
cmp al,'F'
|
|
|
|
|
ja nomaj
|
|
|
|
|
ismaj:
|
|
|
|
|
mov cl,al
|
|
|
|
|
sub cl,'A'-10
|
|
|
|
|
jmp endt
|
|
|
|
|
nomaj:
|
|
|
|
|
mov cl,al
|
|
|
|
|
sub cl,'0'
|
2001-02-04 21:48:09 +01:00
|
|
|
|
endt:
|
|
|
|
|
ret
|
2001-02-03 21:48:09 +01:00
|
|
|
|
|
|
|
|
|
dep db ':',0
|
|
|
|
|
sect dw 0
|
|
|
|
|
xx dw 0
|
|
|
|
|
yy dw 0
|
|
|
|
|
xxyy dw 3
|
|
|
|
|
xxyy2 dw 3
|
2001-02-18 21:48:09 +01:00
|
|
|
|
msg db 'Error : Unchangeable area (ROM) press a key to continu ',0
|
|
|
|
|
menu db 'Top F1, Bottom F2, Offset F3&F4, Segment F5&F6, Mode F7, Quit F8 MODE '
|
|
|
|
|
pope db 'VUE ',0
|
2001-02-03 21:48:09 +01:00
|
|
|
|
spaces db ' <20> ',0
|
|
|
|
|
|
|
|
|
|
showbuffer db 35 dup (0FFh)
|
2001-02-25 21:48:09 +01:00
|
|
|
|
oldmode db 0
|
2001-02-04 21:48:09 +01:00
|
|
|
|
infos db 10 dup (0)
|
2001-02-03 21:48:09 +01:00
|
|
|
|
end start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|