Files
CATALOGO/L_PCX.ASM
2021-09-03 17:43:05 +02:00

72 lines
1.7 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.

_TEXT SEGMENT BYTE PUBLIC 'CODE'
ASSUME CS:_TEXT
PUBLIC _VUELCA_PANTALLA
_VUELCA_PANTALLA PROC NEAR
PUSH BP
MOV BP,SP
PUSH AX
PUSH BX
PUSH CX
PUSH DI
PUSH DS
PUSH DX
PUSH ES
PUSH SI
LDS SI,[BP+4]
MOV AX,0A000h
MOV ES,AX
MOV DI,0
MOV AH,00010001b
MOV DX,480
CLD
SIG_LINEA: MOV BX,4
SON_4_PLANOS: PUSH AX
PUSH DX
MOV DX,3C4H ;MASCARA DE PLANOS
MOV AL,2
OUT DX,AX
POP DX
POP AX
MOV CX,80
LINEA: MOV AL,ES:[DI]
MOVSB
CMP SI,0
JNZ MISMO_SEG
MOV BP,DS
ADD BP,1000h
MOV DS,BP
MISMO_SEG: LOOP LINEA
SUB DI,80
ROL AH,1
DEC BX
JNZ SON_4_PLANOS
ADD DI,80
DEC DX
JNZ SIG_LINEA
POP SI
POP ES
POP DX
POP DS
POP DI
POP CX
POP BX
POP AX
POP BP
RET
_VUELCA_PANTALLA ENDP
_TEXT ENDS
END