feat: mise à jour du code pour compilation sur LZASM en stdcall

This commit is contained in:
Nicolas Hordé 2007-03-24 19:39:03 +00:00
parent 35af9ebbed
commit 1742c77553
1 changed files with 129 additions and 163 deletions

View File

@ -1,133 +1,98 @@
.model tiny
.486
smart
.code
model tiny,stdcall
p586N
locals
jumps
codeseg
option procalign:byte
include "..\include\mem.h"
include "..\include\divers.h"
org 0h
include ..\include\mem.h
start:
header exe <,1,0,,,offset imports,,>
header exe <"CE",1,0,0,,offset imports,,offset realstart>
realstart:
mov ah,28h
int 47h
push word ptr 0FFFFh
push dword ptr 652201
push dword ptr 1545454545
push word ptr 1523
push word ptr 2041
call [savestate]
push 0FFFFh
pushd 652201
pushd 1545454545
push 1523
push 2041
push offset zero
push offset fixe
push word ptr 5
push word ptr 'i'
push word ptr 'a'
push dword ptr 5041
push dword ptr 125645
push dword ptr 5041
push dword ptr 125645
push dword ptr 5041
push dword ptr 125645
push 5
push 'i'
push 'a'
pushd 5041
pushd 125645
pushd 5041
pushd 125645
pushd 5041
pushd 125645
push offset message
call [print]
mov ax,0
xor ax,ax
int 16h
mov ah,2
int 47h
mov ah,30
int 47h
mov ah,2
int 47h
call [clearscreen]
call [xchgpages]
call [clearscreen]
mov cx,200
go1:
mov ah,30
int 47h
mov ah,33
int 47
push offset textdemo1
call [print]
call [xchgpages]
call [waitretrace]
call [print],offset textdemo1
call put
mov ah,30
int 47h
mov ah,33
int 47h
call [xchgpages]
call [waitretrace]
dec cx
jnz go1
mov cx,200
go2:
mov ah,30
int 47h
mov ah,33
int 47h
push offset textdemo2
call [print]
call [xchgpages]
call [waitretrace]
call [print],offset textdemo2
call put
mov ah,30
int 47h
mov ah,33
int 47h
call [xchgpages]
call [waitretrace]
dec cx
jnz go2
mov cx,200
go3:
mov ah,30
int 47h
mov ah,33
int 47h
push offset textdemo3
call [print]
call [xchgpages]
call [waitretrace]
call [print],offset textdemo3
call put
mov ah,30
int 47h
mov ah,33
int 47h
call [xchgpages]
call [waitretrace]
dec cx
jnz go3
mov ah,30
int 47h
mov ah,2
int 47h
push offset texte2
call [print]
mov ah,30
int 47h
mov ah,2
int 47h
mov ah,30
int 47h
call [xchgpages]
call [clearscreen]
call [print],offset texte2
call [xchgpages]
call [clearscreen]
call [xchgpages]
mov bp,255
xor edx,edx
go4:
mov ah,30
int 47h
mov ah,33
int 47h
call [xchgpages]
call [waitretrace]
inc edx
push edx
push offset texte3
call [print]
mov ah,30
int 47h
mov ah,33
int 47h
call [xchgpages]
call [waitretrace]
dec bp
jnz go4
push offset texte4
call [print]
mov ax,0
int 16h
mov ah,29h
int 47h
call [restorestate]
retf
put:
call random
mov di,dx
@ -135,24 +100,21 @@ and di,4096-2
mov si,offset fond
call showstring2
ret
Random:
random:
push ax
MOV AX,cs:[RandSeed]
MOV AX,[cs:randseed]
MOV DX,8405h
MUL DX
INC AX
MOV cs:[RandSeed],AX
MOV [cs:randseed],AX
pop ax
ret
randseed dw 1234h
Randomize:
push ax cx dx
mov ah,0
int 1ah
mov cs:randseed,dx
mov [cs:randseed],dx
pop dx cx ax
ret
@ -188,16 +150,20 @@ showstring2:
strinaize4:
inc si
mov cl,[si]
mov es:[di],cx
mov [es:di],cx
add di,2
dec bl
jnz strinaize4
pop di si cx bx es
ret
imports:
db "VIDEO.LIB::print",0
print dd 0
dw 0
end start
importing
use VIDEO.LIB,print
use VIDEO,xchgpages
use VIDEO,setvideomode
use VIDEO,clearscreen
use VIDEO,savestate
use VIDEO,restorestate
use VIDEO,waitretrace
endi