Category : OS/2 Files
Archive   : DD_IN_C.ZIP
Filename : IOPL.ASM

 
Output of file : IOPL.ASM contained in archive : DD_IN_C.ZIP
;
; Sample IOPL segment
;
PUBLIC IN_PORT
PUBLIC OUT_PORT

.model large
.286P

DGROUP GROUP _DATA
_DATA SEGMENT WORD PUBLIC 'DATA'
_DATA ENDS

_IOSEG segment word public 'CODE'

assume CS: _IOSEG, DS: DGROUP, SS: DGROUP
.286P
;
IN_PORT proc far
;
push bp ;set up stack frame
mov bp,sp ;save bp
push dx ;save dx
mov dx,[bp+6] ;get port address
in ax,dx ;do input
pop dx ;restore regs
pop bp ;return in ax
ret 2 ;remove from IOPL stack
;
IN_PORT endp

OUT_PORT proc far
;
push bp ;set up stack frame
mov bp,sp ;save it
push ax ;save ax
push dx ;and dx
mov ax,[bp+6] ;get data
mov dx,[bp+8] ;get port
out dx,al ;do output
pop dx ;restore regs
pop ax
pop bp
ret 4 ;remove off local stack
;
OUT_PORT endp

_IOSEG ends
end




  3 Responses to “Category : OS/2 Files
Archive   : DD_IN_C.ZIP
Filename : IOPL.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/