feat: mise a jour de l'exemple pour delocalisation fonction dans la librairie video.lib

This commit is contained in:
Nicolas Hordé 2004-11-23 20:42:54 +00:00
parent c461ede7f1
commit ca530927a7
2 changed files with 6 additions and 30 deletions

View File

@ -10,19 +10,19 @@ start:
header exe <,1,0,,,offset imports,offset exports,> header exe <,1,0,,,offset imports,offset exports,>
realstart: realstart:
push offset message
call [affiche] call [affiche]
call [waitkey] call [waitkey]
call [bye]
retf retf
message db 'Appel de la librairie video !',0
imports: imports:
db "EXEM-LIB.LIB::affiche",0 db "VIDEO.LIB::print",0
affiche dd 0 affiche dd 0
db "EXEM-LIB.LIB::waitkey",0 db "EXEM-LIB.LIB::waitkey",0
waitkey dd 0 waitkey dd 0
db "EXEM-LIB.LIB::bye",0
bye dd 0
dw 0 dw 0
exports: exports:

View File

@ -9,41 +9,17 @@ include ..\include\mem.h
start: start:
header exe <,1,0,,,offset imports,offset exports,> header exe <,1,0,,,offset imports,offset exports,>
getvar:
push ds
push cs
pop ds
mov si,offset mes
mov ah,13
int 47h
pop ds
retf
mes db 'c un test qui illustre les appels de fonctions externes !!!',0
getvar2: getvar2:
mov ax,0 mov ax,0
int 16h int 16h
retf retf
mettar:
push ds
push cs
pop ds
mov si,offset mes2
mov ah,13
int 47h
pop ds
retf
mes2 db 'Cela fonctionne.',0
imports: imports:
exports: exports:
db "affiche",0
dw mettar
db "waitkey",0 db "waitkey",0
dw getvar2 dw getvar2
db "bye",0
dw getvar
dw 0 dw 0
end start end start