home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / screen / c_text / goto_xy.asm < prev    next >
Encoding:
Assembly Source File  |  1987-06-16  |  874 b   |  34 lines

  1. ;--------------------------------------------------------------------------;
  2. ; Goto_xy(x,y) - (x,y) integers - x row, y column                          ;
  3. ;--------------------------------------------------------------------------;
  4.  
  5.         ASSUME  CS:_TEXT
  6. _TEXT   SEGMENT BYTE    PUBLIC  'CODE'
  7.         PUBLIC  _GOTO_XY
  8. _GOTO_XY     PROC    NEAR
  9.         PUSH    BP
  10.         MOV     BP,SP
  11.         PUSH    DI
  12.         PUSH    SI
  13.         PUSH    DS
  14.         PUSH    ES
  15.  
  16.         MOV     DH,[BP+4]               ;Row
  17.         MOV     DL,[BP+6]               ;Column
  18.  
  19.         MOV     AH,2                    ;Service 2, Move cursor
  20.         XOR     BH,BH                   ;Page 0
  21.         INT     10h
  22.  
  23.         POP     ES
  24.         POP     DS
  25.         POP     SI
  26.         POP     DI
  27.         POP     BP
  28.         RET
  29. _GOTO_XY ENDP
  30.  
  31. _TEXT   ENDS
  32.         END
  33.  
  34.