home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / sd2.zip / Io.lst < prev    next >
File List  |  1998-05-17  |  4KB  |  96 lines

  1. Microsoft (R) Macro Assembler Version 6.00                 05/17/98 10:44:10
  2. Io.asm                                 Page 1 - 1
  3.  
  4.  
  5.                 ;***********************************************************************\
  6.                 ;*                                Io.asm                               *
  7.                 ;*                 Copyright (C) by Stangl Roman, 1992                 *
  8.                 ;* This Code may be freely distributed, provided the Copyright isn't   *
  9.                 ;* removed.                                                            *
  10.                 ;*                                                                     *
  11.                 ;* IO.asm       Additional utility procedures for ShutDown/2 with IOPL *
  12.                 ;*                                                                     *
  13.                 ;* Part of this code from: Keith Murray (murrayk@prism.cs.orst.edu)    *
  14.                 ;*                         Joel Armengaud (joe2@vnet.ibm.com)          *
  15.                 ;*                                                                     *
  16.                 ;***********************************************************************/
  17.  
  18.  0000                IOPLCSEG SEGMENT PARA PUBLIC USE16 'CODE'
  19.                       ASSUME  CS:IOPLCSEG, DS:NOTHING
  20.  
  21.  0000  40 28 23 29 20 24            db      "@(#) $Header: Io.asm Version 0.10 01,1993 $ (LBL)";
  22.        48 65 61 64 65 72
  23.        3A 20 49 6F 2E 61
  24.        73 6D 20 56 65 72
  25.        73 69 6F 6E 20 30
  26.        2E 31 30 20 30 31
  27.        2C 31 39 39 33 20
  28.        24 20 28 4C 42 4C
  29.        29
  30.  
  31.  000A                args    struc                           ; Structure for arguments passed on stack
  32.  0000  0000                            dw      0h              ;   BP+00 : Saved BP
  33.  0002  0000                            dw      0h              ;   BP+02 : IP of return address
  34.  0004  0000                            dw      0h              ;   BP+04 : CS of return address
  35.  0006  0000                    arg1    dw      0h              ;   BP+06 : First parameter passed
  36.  0008  0000                    arg2    dw      0h              ;   BP+08 : Second parameter passed
  37.                 args    ends
  38.  
  39.                 PUBLIC  IN8                             ; IN arg1
  40.  0031                IN8     PROC    FAR
  41.  0031  55                    PUSH    BP
  42.  0032  8B EC                    MOV     BP,SP
  43.  0034  8B 56 06                    MOV     DX,[BP+06h]             ; Get port
  44.  0037  EC                    IN      AL,DX                   ; Get data from port
  45.  0038  B4 00                    MOV     AH,0h
  46.  003A  5D                    POP     BP
  47.  003B  CA 0002                    RET     2                       ; Clear stack
  48.  003E                IN8     ENDP
  49.  
  50.                 PUBLIC  OUT8                            ; OUT arg1, arg2
  51.  003E                OUT8    PROC    FAR
  52.  003E  55                    PUSH    BP
  53.  003F  8B EC                    MOV     BP,SP
  54.  0041  8B 56 08                    MOV     DX,[BP+08h]             ; Get port
  55.  0044  8B 46 06                    MOV     AX,[BP+06h]             ; Get data
  56.  0047  EE                    OUT     DX,AL                   ; Out data at port
  57.  0048  5D                    POP     BP
  58.  0049  CA 0004                    RET     4                       ; Clear stack
  59.  004C                OUT8    ENDP
  60.  
  61.  004C                IOPLCSEG   ENDS
  62.                    END
  63. 
  64. Microsoft (R) Macro Assembler Version 6.00                 05/17/98 10:44:10
  65. Io.asm                                 Symbols 2 - 1
  66.  
  67.  
  68.  
  69.  
  70. Structures and Unions:
  71.  
  72.                 N a m e                  Size
  73.                                          Offset      Type
  74.  
  75. args . . . . . . . . . . . . . .     000A
  76.   arg1 . . . . . . . . . . . . .     0006         Word
  77.   arg2 . . . . . . . . . . . . .     0008         Word
  78.  
  79.  
  80. Segments and Groups:
  81.  
  82.                 N a m e                 Size     Length   Align   Combine Class
  83.  
  84. IOPLCSEG . . . . . . . . . . . .    16 Bit     004C      Para      Public  'CODE'    
  85.  
  86.  
  87. Procedures,  parameters and locals:
  88.  
  89.                 N a m e                 Type     Value    Attr
  90.  
  91. IN8  . . . . . . . . . . . . . .    P Far     0031      IOPLCSEG    Length= 000D Public
  92. OUT8 . . . . . . . . . . . . . .    P Far     003E      IOPLCSEG    Length= 000E Public
  93.  
  94.        0 Warnings
  95.        0 Errors
  96.