13
1
mirror of https://github.com/vxunderground/MalwareSourceCode synced 2024-06-27 09:28:25 +00:00
vxug-MalwareSourceCode/MSDOS/I-Index/Virus.MSDOS.Unknown.int10.asm
vxunderground 4b9382ddbc re-organize
push
2022-08-21 04:07:57 -05:00

47 lines
1.5 KiB
NASM
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

DOSCALL SEGMENT 'CODE'
ASSUME CS:DOSCALL,DS:DOSCALL
;
;Procedure DOSVIO(VAR: AX, BX, CX, DX: Word);
;
; Issue a DOS VIDEO I/O INT (10) with register values set by caller
;
; FRAME: ADR AX; 12
; ADR BX; 10
; ADR CX; 08
; ADR DX; 06
; <RET BP>; 00
;
PUBLIC DOSVIO
DOSVIO PROC FAR
PUSH BP ;Save current BP value
MOV BP,SP ;To address parms
MOV DI,[BP+12] ;Address of AX
MOV AX,[DI] ;Set AX value
MOV DI,[BP+10] ;Address of BX
MOV BX,[DI] ;Set BX value
MOV DI,[BP+08] ;Address of CX
MOV CX,[DI] ;Set CX value
MOV DI,[BP+06] ;Address of DX
MOV DX,[DI] ;Set DX value
INT 10H ;Call BIOS with caller's AX, BX, CX, DX
MOV DI,[BP+12] ;Now put them all back...
MOV [DI],AX
MOV DI,[BP+10]
MOV [DI],BX
MOV DI,[BP+08]
MOV [DI],CX
MOV DI,[BP+06]
MOV [DI],DX
POP BP ;Restore frame pointer
RET 6 ;Return, poping 6 bytes
DOSVIO ENDP
DOSCALL ENDS
END
*** CREATED 06/28/82 21:05:48 BY AMD ***