Annotation of os2sdk/demos/apps/life/int33h.asm, revision 1.1.1.1

1.1       root        1: ;***   _int33h - simple program to call the mouse interput hex 33
                      2: ;*
                      3: ;*     Passed in [bp+4] is the offset in ds of a six word
                      4: ;*     array containing the data to place in ax,bx,cx, and
                      5: ;*     dx for the int 33h.  An int 33h is then called
                      6: ;*     and ax,bx,cx and dx are returned in the same array.
                      7: ;*     To call from C, store the registers you wish to pass
                      8: ;*     in a near array and call like this:
                      9: ;*
                     10: ;*             int33h (&registers);
                     11: ;*
                     12: ;
                     13: _TEXT  SEGMENT  BYTE PUBLIC 'CODE'
                     14: _TEXT  ENDS
                     15: _DATA  SEGMENT  WORD PUBLIC 'DATA'
                     16: _DATA  ENDS
                     17: CONST  SEGMENT  WORD PUBLIC 'CONST'
                     18: CONST  ENDS
                     19: _BSS   SEGMENT  WORD PUBLIC 'BSS'
                     20: _BSS   ENDS
                     21: DGROUP GROUP   CONST, _BSS, _DATA
                     22:        ASSUME  CS: _TEXT, DS: DGROUP, SS: DGROUP, ES: DGROUP
                     23: _TEXT     SEGMENT
                     24:        PUBLIC  _int33h
                     25: _int33h PROC NEAR
                     26:        push    bp
                     27:        mov     bp,sp
                     28:        push    di
                     29:        push    si
                     30:        mov     si,WORD PTR [bp+4]      ; (ds:si) = array of passed registers
                     31:        mov     ax,[si]                 ; load registers for int
                     32:        mov     bx,[si+2]
                     33:        mov     cx,[si+4]
                     34:        mov     dx,[si+6]
                     35:        int     33h
                     36:        mov     [si],ax                 ; load in returned registers
                     37:        mov     [si+2],bx
                     38:        mov     [si+4],cx
                     39:        mov     [si+6],dx
                     40:        pop     si
                     41:        pop     di
                     42:        mov     sp,bp                   ; exit
                     43:        pop     bp
                     44:        ret
                     45: _int33h ENDP
                     46: _TEXT  ENDS
                     47: END

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.