home *** CD-ROM | disk | FTP | other *** search
- 'Sun Apr 23, 1989 2:19:48 pm
- '****************************************************************************
- 'This routine reads the current position of the cursor--row and column.
- '****************************************************************************
- TYPE RegType
- ax AS INTEGER
- bx AS INTEGER
- cx AS INTEGER
- dx AS INTEGER
- bp AS INTEGER
- si AS INTEGER
- di AS INTEGER
- flags AS INTEGER
- END TYPE
- DIM SHARED inregs AS RegType, outregs AS RegType
- DECLARE SUB readpos (row, col)
- CLS
- LOCATE 9, 14
- readpos row, col
- PRINT row, col
-
- SUB readpos (row, col)
- t1 = &H300: t2 = 0: t3 = 0: t4 = 0
- inregs.ax = t1: inregs.bx = t2: inregs.cx = t3: inregs.dx = t4
- CALL interrupt(&H10, inregs, outregs)
- t1 = outregs.ax: t2 = outregs.bx: t3 = outregs.cx: t4 = outregs.dx
- row = 1 + FIX(t4 / 256)
- col = 1 + t4 - ((FIX(t4 / 256)) * 256)
- END SUB
-
-