Category : Files from Magazines
Archive   : PCTJ1188.ZIP
Filename : GETCRTCR.ASM

 
Output of file : GETCRTCR.ASM contained in archive : PCTJ1188.ZIP
; Microsoft C:
;
; unsigned char GetCRTCReg( n );
; unsigned char n; /* register number */
;

_TEXT SEGMENT byte public 'CODE'
ASSUME cs:_TEXT

PUBLIC _GetCRTCReg
_GetCRTCReg PROC near

push bp
mov bp,sp

mov ax,40h ; get I/O port for CRTC index reg
mov es,ax ; from ROM BIOS data area
mov dx,es:[63h]

mov al,[bp+4] ; AL = register number
cli ; clear interrupts
out dx,al ; write to CRTC index reg
jmp $+2

inc dx ; DX = I/O port for CRTC data reg
in al,dx ; AL = register value
sti ; enable interrupts

xor ah,ah ; AX = return value

pop bp
ret

_GetCRTCReg ENDP

_TEXT ENDS



  3 Responses to “Category : Files from Magazines
Archive   : PCTJ1188.ZIP
Filename : GETCRTCR.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/