2007-03-13 21:56:55 +01:00
|
|
|
|
model tiny,stdcall
|
|
|
|
|
p486
|
2004-11-21 21:38:49 +01:00
|
|
|
|
locals
|
2007-03-13 21:56:55 +01:00
|
|
|
|
jumps
|
|
|
|
|
codeseg
|
|
|
|
|
option procalign:byte
|
|
|
|
|
|
|
|
|
|
include "..\include\mem.h"
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
2007-03-13 21:56:55 +01:00
|
|
|
|
org 0h
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
2007-03-13 21:56:55 +01:00
|
|
|
|
header exe <"CE",1,0,0,offset exports,offset imports,,>
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
2007-03-14 11:22:42 +01:00
|
|
|
|
exporting
|
|
|
|
|
declare print
|
|
|
|
|
declare showdate
|
|
|
|
|
declare showtime
|
|
|
|
|
declare showname
|
|
|
|
|
declare showattr
|
|
|
|
|
declare showsize
|
|
|
|
|
declare showspace
|
|
|
|
|
declare showint
|
|
|
|
|
declare showsigned
|
|
|
|
|
declare showhex
|
|
|
|
|
declare showbin
|
|
|
|
|
declare showbcd
|
|
|
|
|
declare showstring
|
|
|
|
|
declare showstring0
|
|
|
|
|
declare showintr
|
|
|
|
|
declare showintl
|
|
|
|
|
ende
|
2007-03-18 21:27:31 +01:00
|
|
|
|
|
|
|
|
|
importing
|
|
|
|
|
use VIDEO,addline
|
|
|
|
|
use VIDEO,setcolor
|
|
|
|
|
use VIDEO,getxy
|
|
|
|
|
use VIDEO,setxy
|
|
|
|
|
use VIDEO,setvideomode
|
|
|
|
|
use VIDEO,setfont
|
|
|
|
|
use VIDEO,clearscreen
|
|
|
|
|
use VIDEO,enablescroll
|
|
|
|
|
use VIDEO,disablescroll
|
|
|
|
|
use VIDEO,showchar
|
|
|
|
|
endi
|
2007-03-13 21:56:55 +01:00
|
|
|
|
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;================PRINT==============
|
|
|
|
|
;Affiche la chaine %0 en utilisant les parametres de formatage %x....%x
|
|
|
|
|
;-> %0 %x
|
|
|
|
|
;<-
|
|
|
|
|
;===================================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC print FAR
|
|
|
|
|
ARG @@pointer:word
|
2004-11-22 21:53:22 +01:00
|
|
|
|
push ax bx cx si di
|
2004-11-21 21:38:49 +01:00
|
|
|
|
xor di,di
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov si,[@@pointer]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
@@strinaize0:
|
|
|
|
|
mov cl,[si]
|
|
|
|
|
cmp cl,0
|
|
|
|
|
je @@no0
|
|
|
|
|
cmp cl,'%'
|
|
|
|
|
je @@special
|
2004-11-22 21:53:22 +01:00
|
|
|
|
cmp cl,'\'
|
|
|
|
|
je @@special2
|
2004-11-21 21:38:49 +01:00
|
|
|
|
@@showit:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
xor ch,ch
|
|
|
|
|
call [cs:showchar],cx,0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
inc si
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
@@special:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
cmp [byte ptr si+1],'%'
|
2004-11-21 21:38:49 +01:00
|
|
|
|
jne @@notshowit
|
|
|
|
|
inc si
|
|
|
|
|
jmp @@showit
|
|
|
|
|
@@notshowit:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov cl,[byte ptr si+1]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
cmp cl,'c'
|
|
|
|
|
je @@showchar
|
2004-11-23 01:38:12 +01:00
|
|
|
|
cmp cl,'u'
|
2004-11-21 21:38:49 +01:00
|
|
|
|
je @@showint
|
2004-11-23 01:38:12 +01:00
|
|
|
|
cmp cl,'v'
|
|
|
|
|
je @@showfixint
|
|
|
|
|
cmp cl,'w'
|
|
|
|
|
je @@showintr
|
|
|
|
|
cmp cl,'i'
|
2004-11-21 21:38:49 +01:00
|
|
|
|
je @@showsigned
|
|
|
|
|
cmp cl,'h'
|
|
|
|
|
je @@showhex
|
|
|
|
|
cmp cl,'b'
|
|
|
|
|
je @@showbin
|
|
|
|
|
cmp cl,'s'
|
|
|
|
|
je @@showstring
|
|
|
|
|
cmp cl,'0'
|
|
|
|
|
je @@showstring0
|
2004-11-25 01:04:50 +01:00
|
|
|
|
cmp cl,'y'
|
2004-11-21 21:38:49 +01:00
|
|
|
|
je @@showbcd
|
|
|
|
|
cmp cl,'z'
|
|
|
|
|
je @@showsize
|
|
|
|
|
cmp cl,'a'
|
|
|
|
|
je @@showattr
|
|
|
|
|
cmp cl,'n'
|
|
|
|
|
je @@showname
|
|
|
|
|
cmp cl,'t'
|
|
|
|
|
je @@showtime
|
|
|
|
|
cmp cl,'d'
|
|
|
|
|
je @@showdate
|
|
|
|
|
clc
|
|
|
|
|
jmp @@no0
|
|
|
|
|
|
|
|
|
|
@@showchar:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
cmp [byte ptr si+2],'M'
|
2004-11-25 01:04:50 +01:00
|
|
|
|
je @@showmultchar
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar],[word ptr @@pointer+di+2],0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
add si,2
|
|
|
|
|
add di,2
|
|
|
|
|
jmp @@strinaize0
|
2004-11-25 01:04:50 +01:00
|
|
|
|
@@showmultchar:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov cx,[offset @@pointer+di+2+2]
|
2004-11-25 01:04:50 +01:00
|
|
|
|
cmp cx,0
|
|
|
|
|
je @@nextfunc
|
|
|
|
|
@@showcharx:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar],[word ptr @@pointer+di+2],0FFFFh
|
2004-11-25 01:04:50 +01:00
|
|
|
|
dec cx
|
|
|
|
|
jnz @@showcharx
|
|
|
|
|
@@nextfunc:
|
|
|
|
|
add si,3
|
|
|
|
|
add di,4
|
|
|
|
|
jmp @@strinaize0
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
@@showint:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showint,[dword ptr @@pointer+di+2]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
add si,2
|
|
|
|
|
add di,4
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
2004-11-23 01:38:12 +01:00
|
|
|
|
@@showfixint:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintl,[word ptr @@pointer+di+6],[dword ptr @@pointer+di+2]
|
|
|
|
|
add di,6
|
2004-11-23 01:38:12 +01:00
|
|
|
|
add si,2
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
|
|
|
|
@@showintr:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintr,[word ptr @@pointer+di+6],[dword ptr @@pointer+di+2]
|
|
|
|
|
add di,6
|
2004-11-23 01:38:12 +01:00
|
|
|
|
add si,2
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
2004-11-21 21:38:49 +01:00
|
|
|
|
@@showsigned:
|
|
|
|
|
call @@Chosesize
|
|
|
|
|
call showsigned
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
|
|
|
|
@@showhex:
|
|
|
|
|
call @@Chosesize
|
|
|
|
|
call showhex
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
|
|
|
|
@@showbin:
|
|
|
|
|
call @@Chosesize
|
|
|
|
|
call showbin
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
|
|
|
|
@@showstring:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
cmp [byte ptr si+2],'P'
|
|
|
|
|
je @@showstring@@pointer
|
|
|
|
|
call showstring,[word ptr @@pointer+di+2]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
add si,2
|
|
|
|
|
add di,2
|
|
|
|
|
jmp @@strinaize0
|
2007-03-13 21:56:55 +01:00
|
|
|
|
@@showstring@@pointer:
|
2004-11-23 01:38:12 +01:00
|
|
|
|
push ds
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov ds,[offset @@pointer+di+2+2]
|
|
|
|
|
call showstring,[word ptr @@pointer+di+2]
|
2004-11-23 01:38:12 +01:00
|
|
|
|
add si,3
|
|
|
|
|
add di,4
|
|
|
|
|
pop ds
|
|
|
|
|
jmp @@strinaize0
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
@@showstring0:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
cmp [byte ptr si+2],'P'
|
|
|
|
|
je @@showstring0@@pointer
|
|
|
|
|
call showstring0,[word ptr offset @@pointer+di+2]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
add si,2
|
|
|
|
|
add di,2
|
|
|
|
|
jmp @@strinaize0
|
2007-03-13 21:56:55 +01:00
|
|
|
|
@@showstring0@@pointer:
|
2004-11-23 01:38:12 +01:00
|
|
|
|
push ds
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov ds,[offset @@pointer+di+2+2]
|
|
|
|
|
call showstring0,[word ptr offset @@pointer+di+2]
|
2004-11-23 01:38:12 +01:00
|
|
|
|
add si,3
|
|
|
|
|
add di,4
|
|
|
|
|
pop ds
|
|
|
|
|
jmp @@strinaize0
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
@@showbcd:
|
|
|
|
|
call @@Chosesize
|
|
|
|
|
call showbcd
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
|
|
|
|
@@showsize:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showsize,[dword ptr offset @@pointer+di+2]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
add si,2
|
|
|
|
|
add di,4
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
|
|
|
|
@@showattr:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showattr,[word ptr offset @@pointer+di+2]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
add si,2
|
|
|
|
|
add di,2
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
|
|
|
|
@@showname:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showname,[word ptr offset @@pointer+di+2]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
add si,2
|
|
|
|
|
add di,2
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
|
|
|
|
@@showtime:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showtime,[word ptr offset @@pointer+di+2]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
add si,2
|
|
|
|
|
add di,2
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
|
|
|
|
@@showdate:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showdate,[word ptr offset @@pointer+di+2]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
add si,2
|
|
|
|
|
add di,2
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
|
|
|
|
@@Chosesize:
|
|
|
|
|
pop cx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
push [dword ptr offset @@pointer+di+2]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
add di,4
|
2007-03-13 21:56:55 +01:00
|
|
|
|
cmp [byte ptr si+2],'B'
|
2004-11-21 21:38:49 +01:00
|
|
|
|
je @@byte
|
2007-03-13 21:56:55 +01:00
|
|
|
|
cmp [byte ptr si+2],'W'
|
2004-11-21 21:38:49 +01:00
|
|
|
|
je @@word
|
2007-03-13 21:56:55 +01:00
|
|
|
|
cmp [byte ptr si+2],'D'
|
2004-11-21 21:38:49 +01:00
|
|
|
|
je @@dword
|
|
|
|
|
dec si
|
|
|
|
|
|
|
|
|
|
@@word:
|
|
|
|
|
push 16
|
|
|
|
|
add si,3
|
|
|
|
|
push cx
|
|
|
|
|
retn
|
|
|
|
|
|
|
|
|
|
@@byte:
|
|
|
|
|
push 8
|
|
|
|
|
add si,3
|
|
|
|
|
push cx
|
|
|
|
|
retn
|
|
|
|
|
|
|
|
|
|
@@dword:
|
|
|
|
|
push 32
|
|
|
|
|
add si,3
|
|
|
|
|
push cx
|
|
|
|
|
retn
|
2004-11-23 01:38:12 +01:00
|
|
|
|
|
2004-11-22 21:53:22 +01:00
|
|
|
|
@@special2:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
cmp [byte ptr si+1],'\'
|
2004-11-22 21:53:22 +01:00
|
|
|
|
jne @@notshowit2
|
|
|
|
|
inc si
|
|
|
|
|
jmp @@showit
|
|
|
|
|
@@notshowit2:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov cl,[byte ptr si+1]
|
2004-11-22 21:53:22 +01:00
|
|
|
|
cmp cl,'l'
|
|
|
|
|
je @@showline
|
|
|
|
|
cmp cl,'g'
|
|
|
|
|
je @@goto
|
2004-11-23 01:38:12 +01:00
|
|
|
|
cmp cl,'h'
|
|
|
|
|
je @@gotox
|
2004-11-22 21:53:22 +01:00
|
|
|
|
cmp cl,'c'
|
|
|
|
|
je @@color
|
|
|
|
|
cmp cl,'m'
|
|
|
|
|
je @@setvideomode
|
|
|
|
|
cmp cl,'e'
|
|
|
|
|
je @@clearscreen
|
|
|
|
|
cmp cl,'s'
|
|
|
|
|
je @@savestate
|
|
|
|
|
cmp cl,'r'
|
|
|
|
|
je @@restorestate
|
|
|
|
|
cmp cl,'i'
|
|
|
|
|
je @@enablescroll
|
|
|
|
|
cmp cl,'j'
|
|
|
|
|
je @@disablescroll
|
|
|
|
|
cmp cl,'f'
|
|
|
|
|
je @@setfont
|
|
|
|
|
clc
|
|
|
|
|
jmp @@no0
|
2004-11-23 01:38:12 +01:00
|
|
|
|
|
2004-11-22 21:53:22 +01:00
|
|
|
|
@@color:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov al,[si+2]
|
|
|
|
|
sub al,'0'
|
|
|
|
|
shl al,4
|
|
|
|
|
add al,[si+3]
|
|
|
|
|
sub al,'0'
|
|
|
|
|
xor ah,ah
|
|
|
|
|
call [cs:setcolor],ax
|
2004-11-22 21:53:22 +01:00
|
|
|
|
add si,4
|
|
|
|
|
jmp @@strinaize0
|
2004-11-23 01:38:12 +01:00
|
|
|
|
|
|
|
|
|
@@gotox:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov bh,[si+2]
|
2004-11-23 01:38:12 +01:00
|
|
|
|
sub bh,'0'
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov bl,bh
|
|
|
|
|
shl bl,3
|
|
|
|
|
add bl,bh
|
|
|
|
|
add bl,bh
|
|
|
|
|
add bl,[si+3]
|
|
|
|
|
sub bl,'0'
|
|
|
|
|
xor bh,bh
|
|
|
|
|
call [cs:getxy]
|
|
|
|
|
xor ah,ah
|
|
|
|
|
call [cs:setxy],bx,ax
|
2004-11-23 01:38:12 +01:00
|
|
|
|
add si,4
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
|
2004-11-22 21:53:22 +01:00
|
|
|
|
@@setvideomode:
|
2004-11-23 01:38:12 +01:00
|
|
|
|
mov ah,[si+2]
|
|
|
|
|
sub ah,'0'
|
|
|
|
|
mov al,ah
|
|
|
|
|
shl al,3
|
|
|
|
|
add al,ah
|
|
|
|
|
add al,ah
|
2004-11-22 21:53:22 +01:00
|
|
|
|
add al,[si+3]
|
|
|
|
|
sub al,'0'
|
2007-03-13 21:56:55 +01:00
|
|
|
|
xor ah,ah
|
|
|
|
|
call [cs:setvideomode]
|
2004-11-22 21:53:22 +01:00
|
|
|
|
add si,4
|
|
|
|
|
jmp @@strinaize0
|
2004-11-23 01:38:12 +01:00
|
|
|
|
|
2004-11-22 21:53:22 +01:00
|
|
|
|
@@setfont:
|
2004-11-23 01:38:12 +01:00
|
|
|
|
mov ah,[si+2]
|
|
|
|
|
sub ah,'0'
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov al,ah
|
|
|
|
|
shl al,3
|
|
|
|
|
add al,ah
|
|
|
|
|
add al,ah
|
|
|
|
|
add al,[si+3]
|
|
|
|
|
sub al,'0'
|
|
|
|
|
xor ah,ah
|
|
|
|
|
call [cs:setfont],ax
|
2004-11-22 21:53:22 +01:00
|
|
|
|
add si,4
|
|
|
|
|
jmp @@strinaize0
|
2004-11-23 01:38:12 +01:00
|
|
|
|
|
2004-11-22 21:53:22 +01:00
|
|
|
|
@@showline:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:addline]
|
2004-11-22 21:53:22 +01:00
|
|
|
|
add si,2
|
|
|
|
|
jmp @@strinaize0
|
2004-11-23 01:38:12 +01:00
|
|
|
|
|
2004-11-22 21:53:22 +01:00
|
|
|
|
@@clearscreen:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:clearscreen]
|
2004-11-22 21:53:22 +01:00
|
|
|
|
add si,2
|
|
|
|
|
jmp @@strinaize0
|
2004-11-23 01:38:12 +01:00
|
|
|
|
|
2004-11-22 21:53:22 +01:00
|
|
|
|
@@savestate:
|
|
|
|
|
mov ah,40
|
|
|
|
|
int 47h
|
|
|
|
|
add si,2
|
|
|
|
|
jmp @@strinaize0
|
2004-11-23 01:38:12 +01:00
|
|
|
|
|
2004-11-22 21:53:22 +01:00
|
|
|
|
@@restorestate:
|
|
|
|
|
mov ah,41
|
|
|
|
|
int 47h
|
|
|
|
|
add si,2
|
|
|
|
|
jmp @@strinaize0
|
2004-11-23 01:38:12 +01:00
|
|
|
|
|
2004-11-22 21:53:22 +01:00
|
|
|
|
@@enablescroll:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:enablescroll]
|
2004-11-22 21:53:22 +01:00
|
|
|
|
add si,2
|
|
|
|
|
jmp @@strinaize0
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
2004-11-22 21:53:22 +01:00
|
|
|
|
@@disablescroll:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:disablescroll]
|
2004-11-22 21:53:22 +01:00
|
|
|
|
add si,2
|
|
|
|
|
jmp @@strinaize0
|
2004-11-23 01:38:12 +01:00
|
|
|
|
|
2004-11-22 21:53:22 +01:00
|
|
|
|
@@goto:
|
2004-11-23 01:38:12 +01:00
|
|
|
|
mov ah,[si+2]
|
|
|
|
|
sub ah,'0'
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov al,ah
|
|
|
|
|
shl al,3
|
|
|
|
|
add al,ah
|
|
|
|
|
add al,ah
|
|
|
|
|
add al,[si+3]
|
|
|
|
|
sub al,'0'
|
|
|
|
|
xor ah,ah
|
2004-11-22 21:53:22 +01:00
|
|
|
|
;
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov bh,[si+5]
|
|
|
|
|
sub bh,'0'
|
|
|
|
|
mov bl,bh
|
2004-11-23 01:38:12 +01:00
|
|
|
|
shl bl,3
|
2007-03-13 21:56:55 +01:00
|
|
|
|
add bl,bh
|
|
|
|
|
add bl,bh
|
2004-11-25 01:04:50 +01:00
|
|
|
|
add bl,[si+6]
|
2004-11-22 21:53:22 +01:00
|
|
|
|
sub bl,'0'
|
2007-03-13 21:56:55 +01:00
|
|
|
|
xor bh,bh
|
|
|
|
|
call [cs:setxy],ax,bx
|
2004-11-22 21:53:22 +01:00
|
|
|
|
mov ah,25
|
|
|
|
|
int 47h
|
|
|
|
|
add si,7
|
|
|
|
|
jmp @@strinaize0
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
@@no0:
|
|
|
|
|
add di,bp
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov ax,[ss:bp] ;BP
|
|
|
|
|
mov bx,[ss:bp+2] ;IP
|
|
|
|
|
mov cx,[ss:bp+4] ;CS
|
|
|
|
|
mov [ss:di],ax
|
|
|
|
|
mov [ss:di+2],bx
|
|
|
|
|
mov [ss:di+4],cx
|
2004-11-21 21:38:49 +01:00
|
|
|
|
mov bp,di
|
2004-11-22 21:53:22 +01:00
|
|
|
|
pop di si cx bx ax
|
2004-11-21 21:38:49 +01:00
|
|
|
|
mov sp,bp
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
ENDP print
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;================SHOWDATE==============
|
|
|
|
|
;Affiche la date contenu en %0
|
|
|
|
|
;-> %0
|
|
|
|
|
;<-
|
|
|
|
|
;======================================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showdate FAR
|
|
|
|
|
ARG @dates:word
|
|
|
|
|
USES edx
|
2004-11-21 21:38:49 +01:00
|
|
|
|
xor edx,edx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov dx,[@dates]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
and dx,11111b
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintl,2,edx
|
|
|
|
|
call [cs:showchar],'/',0FFFFh
|
|
|
|
|
mov dx,[@dates]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
shr dx,5
|
|
|
|
|
and dx,111b
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintl,2,edx
|
|
|
|
|
call [cs:showchar],'/',0FFFFh
|
|
|
|
|
mov dx,[@dates]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
shr dx,8
|
|
|
|
|
and dx,11111111b
|
|
|
|
|
add dx,1956
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintl,2,edx
|
|
|
|
|
ret
|
|
|
|
|
ENDP showdate
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;================SHOWTIME==============
|
|
|
|
|
;Affiche l'heure contenu en %0
|
|
|
|
|
;-> %0
|
|
|
|
|
;<-
|
|
|
|
|
;======================================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showtime FAR
|
|
|
|
|
ARG @times:word
|
|
|
|
|
USES edx
|
2004-11-21 21:38:49 +01:00
|
|
|
|
xor edx,edx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov dx,[@times]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
shr dx,11
|
|
|
|
|
and dx,11111b
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintl,2,edx
|
|
|
|
|
call [cs:showchar],':',0FFFFh
|
|
|
|
|
mov dx,[@times]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
shr dx,5
|
|
|
|
|
and dx,111111b
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintl,2,edx
|
|
|
|
|
call [cs:showchar],':',0FFFFh
|
|
|
|
|
mov dx,[@times]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
and dx,11111b
|
|
|
|
|
shl dx,1
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintl,2,edx
|
|
|
|
|
ret
|
|
|
|
|
ENDP showtime
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;================SHOWNAME==============
|
|
|
|
|
;Affiche le nom point<6E> par ds:%0
|
|
|
|
|
;-> ds:%0
|
|
|
|
|
;<-
|
|
|
|
|
;======================================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showname FAR
|
|
|
|
|
ARG @thename:word
|
|
|
|
|
USES cx,si
|
|
|
|
|
mov si,[@thename]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
xor cx,cx
|
|
|
|
|
@@showthename:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar],[word ptr ds:si],0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
inc si
|
|
|
|
|
inc cx
|
|
|
|
|
cmp cx,8
|
|
|
|
|
jne @@suiteaname
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar],' ',0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
@@suiteaname:
|
|
|
|
|
cmp cx,8+3
|
|
|
|
|
jb @@showthename
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ret
|
|
|
|
|
ENDP showname
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;================SHOWATTR==============
|
|
|
|
|
;Affiche les attributs sp<73>cifi<66> par %0
|
|
|
|
|
;-> %0
|
|
|
|
|
;<-
|
|
|
|
|
;======================================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showattr FAR
|
|
|
|
|
ARG @attr:word
|
|
|
|
|
push 0FFFFh
|
|
|
|
|
test [@attr],00000001b
|
2004-11-21 21:38:49 +01:00
|
|
|
|
je @@noreadonly
|
|
|
|
|
push 'L'
|
|
|
|
|
jmp @@readonly
|
|
|
|
|
@@noreadonly:
|
|
|
|
|
push '-'
|
|
|
|
|
@@readonly:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar]
|
|
|
|
|
push 0FFFFh
|
|
|
|
|
test [@attr],00000010b
|
2004-11-21 21:38:49 +01:00
|
|
|
|
je @@nohidden
|
|
|
|
|
push 'C'
|
|
|
|
|
jmp @@hidden
|
|
|
|
|
@@nohidden:
|
|
|
|
|
push '-'
|
|
|
|
|
@@hidden:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar]
|
|
|
|
|
push 0FFFFh
|
|
|
|
|
test [@attr],00000100b
|
2004-11-21 21:38:49 +01:00
|
|
|
|
je @@nosystem
|
|
|
|
|
push 'S'
|
|
|
|
|
jmp @@system
|
|
|
|
|
@@nosystem:
|
|
|
|
|
push '-'
|
|
|
|
|
@@system:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar]
|
|
|
|
|
push 0FFFFh
|
|
|
|
|
test [@attr],00100000b
|
2004-11-21 21:38:49 +01:00
|
|
|
|
je @@noarchive
|
|
|
|
|
push 'A'
|
|
|
|
|
jmp @@archive
|
|
|
|
|
@@noarchive:
|
|
|
|
|
push '-'
|
|
|
|
|
@@archive:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar]
|
|
|
|
|
push 0FFFFh
|
|
|
|
|
test [@attr],00010000b
|
2004-11-21 21:38:49 +01:00
|
|
|
|
je @@nodirectory
|
|
|
|
|
push 'R'
|
|
|
|
|
jmp @@directory
|
|
|
|
|
@@nodirectory:
|
|
|
|
|
push '-'
|
|
|
|
|
@@directory:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar]
|
|
|
|
|
ret
|
|
|
|
|
ENDP showattr
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;================SHOWSIZE==============
|
|
|
|
|
;Affiche le nom point<6E> par %0
|
|
|
|
|
;-> %0
|
|
|
|
|
;<-
|
|
|
|
|
;======================================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showsize FAR
|
|
|
|
|
ARG @thesize:dword
|
|
|
|
|
USES edx,ds
|
2004-11-21 21:38:49 +01:00
|
|
|
|
push cs
|
|
|
|
|
pop ds
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov edx,[@thesize]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
cmp edx,1073741824
|
|
|
|
|
ja @@giga
|
|
|
|
|
cmp edx,1048576*9
|
|
|
|
|
ja @@mega
|
|
|
|
|
cmp edx,1024*9
|
|
|
|
|
ja @@kilo
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintr,4,edx
|
|
|
|
|
call showstring0,offset unit
|
2004-11-21 21:38:49 +01:00
|
|
|
|
jmp @@finsize
|
|
|
|
|
@@kilo:
|
|
|
|
|
shr edx,10
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintr,4,edx
|
|
|
|
|
call showstring0,offset unitkilo
|
2004-11-21 21:38:49 +01:00
|
|
|
|
jmp @@finsize
|
|
|
|
|
@@mega:
|
|
|
|
|
shr edx,20
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintr,4,edx
|
|
|
|
|
call showstring0,offset unitmega
|
2004-11-21 21:38:49 +01:00
|
|
|
|
jmp @@finsize
|
|
|
|
|
@@giga:
|
|
|
|
|
shr edx,30
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showintr,4,edx
|
|
|
|
|
call showstring0,offset unitgiga
|
2004-11-21 21:38:49 +01:00
|
|
|
|
@@finsize:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ret
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
unit db ' o ',0
|
|
|
|
|
unitkilo db ' ko',0
|
|
|
|
|
unitmega db ' mo',0
|
|
|
|
|
unitgiga db ' go',0
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ENDP showsize
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;==========SHOWSPACE===========
|
|
|
|
|
;met un espace apr<70>s le curseur
|
|
|
|
|
;->
|
|
|
|
|
;<-
|
|
|
|
|
;==============================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showspace FAR
|
|
|
|
|
call [cs:showchar],' ',0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
clc
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ret
|
|
|
|
|
ENDP showspace
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;==========SHOWINT===========
|
|
|
|
|
;Affiche un entier %0 apr<70>s le curseur
|
|
|
|
|
;-> %0
|
|
|
|
|
;<-
|
|
|
|
|
;============================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showint FAR
|
|
|
|
|
ARG @integer:dword
|
|
|
|
|
USES eax,bx,cx,edx,esi
|
2004-11-21 21:38:49 +01:00
|
|
|
|
xor cx,cx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov eax,[@integer]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
mov esi,10
|
|
|
|
|
mov bx,offset showbuffer+27
|
|
|
|
|
@@decint:
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div esi
|
|
|
|
|
add dl,'0'
|
|
|
|
|
inc cx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov [cs:bx],dl
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec bx
|
|
|
|
|
cmp ax,0
|
|
|
|
|
jne @@decint
|
|
|
|
|
mov ax,cx
|
|
|
|
|
@@showinteger:
|
|
|
|
|
inc bx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov cl,[cs:bx]
|
|
|
|
|
call [cs:showchar],cx,0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec ax
|
|
|
|
|
jnz @@showinteger
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ret
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
showbuffer db 50 dup (0FFh)
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ENDP showint
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
2004-11-23 01:52:49 +01:00
|
|
|
|
;==========SHOWINTL===========
|
|
|
|
|
;Affiche un entier %0 apr<70>s le curseur de taille %1 caract<63>re centr<74> a gauche
|
|
|
|
|
;-> %0 un entier % taille en caract<63>res
|
2004-11-21 21:38:49 +01:00
|
|
|
|
;<-
|
2004-11-23 01:52:49 +01:00
|
|
|
|
;===============================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showintl FAR
|
|
|
|
|
ARG @sizeofint:word,@integer:dword
|
|
|
|
|
USES eax,bx,cx,edx,esi,di
|
|
|
|
|
mov di,[@sizeofint]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
xor cx,cx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov eax,[@integer]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
mov esi,10
|
|
|
|
|
mov bx,offset showbuffer+27
|
|
|
|
|
@@decint:
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div esi
|
|
|
|
|
add dl,'0'
|
|
|
|
|
inc cx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov [cs:bx],dl
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec bx
|
|
|
|
|
cmp cx,di
|
|
|
|
|
jae @@nomuch
|
|
|
|
|
cmp ax,0
|
|
|
|
|
jne @@decint
|
|
|
|
|
mov ax,di
|
|
|
|
|
xchg cx,di
|
|
|
|
|
sub cx,di
|
|
|
|
|
@@rego:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov [byte ptr cs:bx],'0'
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec bx
|
|
|
|
|
dec cx
|
|
|
|
|
jnz @@rego
|
|
|
|
|
jmp @@finishim
|
|
|
|
|
@@nomuch:
|
|
|
|
|
mov ax,di
|
|
|
|
|
@@finishim:
|
|
|
|
|
@@showinteger:
|
|
|
|
|
inc bx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov cl,[cs:bx]
|
|
|
|
|
call [cs:showchar],cx,0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec ax
|
|
|
|
|
jnz @@showinteger
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ret
|
|
|
|
|
ENDP showintl
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;==========SHOWINTR===========
|
2004-11-23 01:52:49 +01:00
|
|
|
|
;Affiche un entier %0 apr<70>s le curseur de taille %1 caract<63>re centr<74> a droite
|
|
|
|
|
;-> %0 un entier % taille en caract<63>res
|
2004-11-21 21:38:49 +01:00
|
|
|
|
;<-
|
2004-11-23 01:52:49 +01:00
|
|
|
|
;===============================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showintr FAR
|
|
|
|
|
ARG @sizeofint:word,@integer:dword
|
|
|
|
|
USES eax,bx,cx,edx,esi,di
|
|
|
|
|
mov di,[@sizeofint]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
xor cx,cx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov eax,[@integer]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
mov esi,10
|
|
|
|
|
mov bx,offset showbuffer+27
|
|
|
|
|
@@decint:
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div esi
|
|
|
|
|
add dl,'0'
|
|
|
|
|
inc cx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov [cs:bx],dl
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec bx
|
|
|
|
|
cmp cx,di
|
|
|
|
|
jae @@nomuch
|
|
|
|
|
cmp ax,0
|
|
|
|
|
jne @@decint
|
|
|
|
|
mov ax,di
|
|
|
|
|
xchg cx,di
|
|
|
|
|
sub cx,di
|
|
|
|
|
@@rego:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov [byte ptr cs:bx],' '
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec bx
|
|
|
|
|
dec cx
|
|
|
|
|
jnz @@rego
|
|
|
|
|
jmp @@finishim
|
|
|
|
|
@@nomuch:
|
|
|
|
|
mov ax,di
|
|
|
|
|
@@finishim:
|
|
|
|
|
@@showinteger:
|
|
|
|
|
inc bx
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov cl,[cs:bx]
|
|
|
|
|
call [cs:showchar],cx,0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec ax
|
|
|
|
|
jnz @@showinteger
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ret
|
|
|
|
|
ENDP showintr
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;==========SHOWSIGNED===========
|
|
|
|
|
;Affiche un entier %0 de taille %1 apr<70>s le curseur
|
|
|
|
|
;-> %0 un entier, %1 la taille
|
|
|
|
|
;<-
|
2004-11-23 01:52:49 +01:00
|
|
|
|
;===============================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showsigned FAR
|
|
|
|
|
ARG @sizeofint:word,@integer:dword=taille
|
|
|
|
|
USES ebx,cx,edx
|
|
|
|
|
mov ebx,[@integer]
|
|
|
|
|
mov cx,[@sizeofint]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
xor edx,edx
|
|
|
|
|
cmp cx,1
|
|
|
|
|
ja @@signed16
|
|
|
|
|
mov dl,bl
|
|
|
|
|
cmp dl,7Fh
|
|
|
|
|
jbe @@notsigned
|
|
|
|
|
neg dl
|
|
|
|
|
jmp @@showminus
|
|
|
|
|
@@signed16:
|
|
|
|
|
cmp cx,2
|
|
|
|
|
ja @@signed32
|
|
|
|
|
mov dx,bx
|
|
|
|
|
cmp dx,7FFFh
|
|
|
|
|
jbe @@notsigned
|
|
|
|
|
neg dx
|
|
|
|
|
jmp @@showminus
|
|
|
|
|
@@signed32:
|
|
|
|
|
mov edx,ebx
|
|
|
|
|
cmp edx,7FFFFFFFh
|
|
|
|
|
jbe @@notsigned
|
|
|
|
|
neg edx
|
|
|
|
|
@@showminus:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar],'-',0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
@@notsigned:
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call showint,edx,0FFFFh
|
|
|
|
|
ret
|
|
|
|
|
ENDP showsigned
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;==========SHOWHEX===========
|
|
|
|
|
;Affiche un nombre hexad<61>cimal %0 de taille %1 apr<70>s le curseur
|
|
|
|
|
;-> %0 un entier, %1 la taille
|
|
|
|
|
;<-
|
|
|
|
|
;============================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showhex FAR
|
|
|
|
|
ARG @sizeofint:word,@integer:dword=taille
|
|
|
|
|
USES ax,bx,cx,edx
|
|
|
|
|
mov edx,[@integer]
|
|
|
|
|
mov cx,[@sizeofint]
|
|
|
|
|
mov ax,cx
|
2004-11-21 21:38:49 +01:00
|
|
|
|
shr ax,2
|
|
|
|
|
sub cx,32
|
|
|
|
|
neg cx
|
|
|
|
|
shl edx,cl
|
|
|
|
|
@@Hexaize:
|
|
|
|
|
rol edx,4
|
|
|
|
|
mov bx,dx
|
|
|
|
|
and bx,0fh
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov cl,[cs:bx+offset Tab]
|
|
|
|
|
call [cs:showchar],cx,0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec al
|
|
|
|
|
jnz @@Hexaize
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ret
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
Tab db '0123456789ABCDEF'
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ENDP showhex
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;==========SHOWBIN===========
|
|
|
|
|
;Affiche un nombre binaire %0 de taille %1 apr<70>s le curseur
|
|
|
|
|
;-> %0 un entier, %1 la taille
|
|
|
|
|
;<-
|
|
|
|
|
;============================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showbin FAR
|
|
|
|
|
ARG @sizeofint:word,@integer:dword=taille
|
|
|
|
|
USES ax,cx,edx
|
|
|
|
|
mov edx,[@integer]
|
|
|
|
|
mov cx,[@sizeofint]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
sub cx,32
|
|
|
|
|
neg cx
|
|
|
|
|
shl edx,cl
|
2007-03-13 21:56:55 +01:00
|
|
|
|
mov ax,[@sizeofint]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
@@binaize:
|
|
|
|
|
rol edx,1
|
|
|
|
|
mov cl,'0'
|
|
|
|
|
adc cl,0
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar],cx,0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec al
|
|
|
|
|
jnz @@binaize
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ret
|
|
|
|
|
ENDP showbin
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;==========SHOWBCD===========
|
|
|
|
|
;Affiche un nombre en BCD %0 de taille %1 apr<70>s le curseur
|
|
|
|
|
;-> %0 un entier, %1 la taille
|
|
|
|
|
;<-
|
|
|
|
|
;============================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showbcd FAR
|
|
|
|
|
ARG @sizeofint:word,@integer:dword
|
|
|
|
|
USES ax,cx,edx
|
|
|
|
|
mov edx,[@integer]
|
|
|
|
|
mov ax,[@sizeofint]
|
|
|
|
|
mov cx,ax
|
2004-11-21 21:38:49 +01:00
|
|
|
|
shr ax,2
|
|
|
|
|
sub cx,32
|
|
|
|
|
neg cx
|
|
|
|
|
shl edx,cl
|
|
|
|
|
@@BCDaize:
|
|
|
|
|
rol edx,4
|
|
|
|
|
mov cl,dl
|
|
|
|
|
and cl,0fh
|
|
|
|
|
add cl,'0'
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar],cx,0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec al
|
|
|
|
|
jnz @@BCDaize
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ret
|
|
|
|
|
ENDP showbcd
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;==========SHOWSTRING===========
|
|
|
|
|
;Affiche une chaine de caract<63>re point<6E>e par ds:%1 apr<70>s le curseur
|
|
|
|
|
;-> ds:%1 pointeur chaine type pascal
|
|
|
|
|
;<-
|
|
|
|
|
;===============================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showstring FAR
|
|
|
|
|
ARG @pointer:word
|
|
|
|
|
USES bx,si
|
|
|
|
|
mov si,[@pointer]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
mov bl,[si]
|
|
|
|
|
@@strinaize:
|
|
|
|
|
inc si
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar],[word ptr si],0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
dec bl
|
|
|
|
|
jnz @@strinaize
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ret
|
|
|
|
|
ENDP showstring
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|
|
|
|
|
;==========SHOWSTRING0===========
|
|
|
|
|
;Affiche une chaine de caract<63>re point<6E>e par ds:%1 apr<70>s le curseur
|
|
|
|
|
;-> ds:%1 pointeur chaine type z<>ro terminal
|
|
|
|
|
;<-
|
|
|
|
|
;================================
|
2007-03-13 21:56:55 +01:00
|
|
|
|
PROC showstring0 FAR
|
|
|
|
|
ARG @pointer:word
|
|
|
|
|
USES cx,si
|
|
|
|
|
mov si,[@pointer]
|
2004-11-21 21:38:49 +01:00
|
|
|
|
@@strinaize0:
|
|
|
|
|
mov cl,[si]
|
|
|
|
|
cmp cl,0
|
|
|
|
|
je @@no0
|
2007-03-13 21:56:55 +01:00
|
|
|
|
call [cs:showchar],cx,0FFFFh
|
2004-11-21 21:38:49 +01:00
|
|
|
|
inc si
|
|
|
|
|
jmp @@strinaize0
|
|
|
|
|
@@no0:
|
2004-11-22 21:53:22 +01:00
|
|
|
|
ret
|
2007-03-13 21:56:55 +01:00
|
|
|
|
ENDP showstring0
|
2004-11-21 21:38:49 +01:00
|
|
|
|
|