◄Example► ◄Back► ◄Contents► ◄Index► ────────────────────────────────────────────────────────────────────────────── ;* GetVidOffset - Macro to determine offset in video segment that corresponds ;* to given screen coordinates. ;* ;* Params: row - Screen row (top line = 0) ;* col - Screen column (leftmost column = 0) GetVidOffset MACRO row, col ;; Macro definition mov ax, row mov bl, 80 ;; Number of columns per row * mul bl ;; current row + current column = add ax, col ;; character byte # shl ax, 1 ;; Double to account for cell size ENDM ;; Result in AX register -♦-