feat: mise à jour du code pour compilation sur LZASM en stdcall
This commit is contained in:
parent
85ea3e1514
commit
c83c7cf1fe
|
@ -1,82 +1,77 @@
|
||||||
.model tiny
|
model tiny,stdcall
|
||||||
.486
|
p586N
|
||||||
smart
|
locals
|
||||||
.code
|
jumps
|
||||||
|
codeseg
|
||||||
|
option procalign:byte
|
||||||
|
|
||||||
|
include "..\include\mem.h"
|
||||||
|
include "..\include\divers.h"
|
||||||
|
|
||||||
org 0h
|
org 0h
|
||||||
|
|
||||||
include ..\include\mem.h
|
|
||||||
include ..\include\divers.h
|
|
||||||
|
|
||||||
start:
|
start:
|
||||||
header exe <,1,0,,,offset imports,,>
|
header exe <"CE",1,0,0,,offset imports,,offset realstart>
|
||||||
|
|
||||||
realstart:
|
realstart:
|
||||||
push offset msg
|
call [cs:print],offset msg
|
||||||
call [print]
|
xor ebx,ebx
|
||||||
|
xor cx,cx
|
||||||
xor cx,cx
|
|
||||||
listmcb:
|
listmcb:
|
||||||
mov ah,4
|
call [cs:mbget],cx
|
||||||
int 49h
|
jc fino
|
||||||
jc fino
|
dec ax
|
||||||
inc cx
|
dec ax
|
||||||
|
mov gs,ax
|
||||||
;placement mémoire
|
inc cx
|
||||||
mov dx,gs
|
mov dx,gs
|
||||||
inc dx
|
push edx ;Emplacement memoire hex 2
|
||||||
inc dx
|
|
||||||
push edx
|
|
||||||
|
|
||||||
;parent
|
;parent
|
||||||
cmp gs:[MB.Reference],0
|
cmp [gs:mb.reference],0
|
||||||
je next
|
jne next
|
||||||
mov dx,gs:[MB.Reference]
|
push cs
|
||||||
dec dx
|
push offset none ;parent lstr0 2x2
|
||||||
dec dx
|
add bx,[gs:mb.sizes]
|
||||||
push dx
|
jmp suitemn
|
||||||
push offset MB.Names
|
|
||||||
jmp suitemn
|
|
||||||
next:
|
next:
|
||||||
push cs
|
mov dx,[gs:mb.reference]
|
||||||
push offset none
|
dec dx
|
||||||
|
dec dx
|
||||||
|
push dx ;parent lstr0 2x2
|
||||||
|
push offset (mb).names
|
||||||
suitemn:
|
suitemn:
|
||||||
|
cmp [gs: mb.isresident],true
|
||||||
;Resident
|
jne notresident
|
||||||
cmp gs:[MB.IsResident],true
|
push offset resident ;resident str0 2
|
||||||
jne notresident
|
jmp suitelistmcb
|
||||||
push offset resident
|
|
||||||
jmp suitelistmcb
|
|
||||||
notresident:
|
notresident:
|
||||||
push offset nonresident
|
push offset nonresident ;resident str0 2
|
||||||
suitelistmcb:
|
suitelistmcb:
|
||||||
|
xor edx,edx
|
||||||
;taille memoire
|
mov dx,[gs: mb.sizes]
|
||||||
xor edx,edx
|
shl edx,4
|
||||||
mov dx,gs:[MB.Sizes]
|
push 6 ;decimal 4 + type 2
|
||||||
shl edx,4
|
push edx
|
||||||
push 6
|
push gs ;nom lstr0 2x2
|
||||||
push edx
|
push offset (mb).names
|
||||||
|
push offset line2 ;ligne
|
||||||
;nom
|
call [cs:print]
|
||||||
push gs
|
jmp listmcb
|
||||||
push offset MB.Names
|
|
||||||
|
|
||||||
push offset line
|
|
||||||
call [print]
|
|
||||||
|
|
||||||
jmp listmcb
|
|
||||||
fino:
|
fino:
|
||||||
db 0CBh
|
shl ebx,4
|
||||||
resident db "oui",0
|
push ebx
|
||||||
nonresident db "non",0
|
push offset fin
|
||||||
line db "%0P\h15%w\h24%0\h30%0P\h46%hW\l",0
|
call [cs:print]
|
||||||
msg db "Memory manager V1.5\lNom Taille Res Parent Mem\l",0
|
retf
|
||||||
none db ".",0
|
resident db "oui",0
|
||||||
|
nonresident db "non",0
|
||||||
|
line2 db "%0P\h15|%w\h25|%0\h30|%0P\h46|%hW\l",0
|
||||||
|
fin db "\l\l\c02%u octets de memoire disponible\l\c07",0
|
||||||
|
msg db "Plan de la memoire\l\lNom | Taille |Res |Parent |Mem\l",0
|
||||||
|
none db ".",0
|
||||||
|
|
||||||
imports:
|
|
||||||
db "VIDEO.LIB::print",0
|
importing
|
||||||
print dd 0
|
use VIDEO.LIB,print
|
||||||
dw 0
|
use SYSTEME,mbget
|
||||||
|
endi
|
||||||
end start
|
|
||||||
|
|
Loading…
Reference in New Issue