data  segment 'data'
nchar dw         0
data  ends
code  segment 'code'
      assume cs:code,ds:data
seg1  group code,data
      public setcur
; sets cursor position
; call setcur(row,column)
setcur proc far
       push   bp
       mov    bp,sp
       push   di
       push   si
       mov    es,[bp+12]  ;segment address
       mov    di,[bp+10]  
       mov    dh,es:[di]  ;row number
       mov    si,[bp+6]
       mov    dl,es:[si]  ;column number
       mov    bh,0
       mov    ah,2
       int    10h
       pop    si
       pop    di
       mov    sp,bp
       pop    bp
       ret    8
setcur endp
code  ends
      end
