;************************************************************************
; ADDCUR.M68 - Address of Cursor SBR
;
; by Dave Heyliger - AMUS Staff
;
; Reads the address of the cursor and returns "(x,y)" in A$
;
; Example:
;
; PRINT TAB (-1,0); ! clear the screen
; PRINT TAB (15,20); ! tab to here
; XCALL ADDCUR,A$ ! read cursor address (15,20)
; PRINT ! print to new line
; PRINT "ADDRESS IS " A$ ! print out address in A$
;************************************************************************
MOV 4(A3),A2 ;A0 points to A$
CLR @A2 ;clear out A$
CLR 4(A2) ;for 10 characters
CLRW 10(A2)
MOVB #'(,(A2)+ ;start string
KBD ;get row
SUBB #37,D1 ;convert to binary number
DCVT 0,OT$MEM ;convert to decimal in string
MOVB #',,(A2)+ ;move in ","
KBD ;get column
SUBB #37,D1 ;convert to binary number
DCVT 0,OT$MEM ;convert to decimal in string
MOVB #'),@A2 ;finish the string
KBD ;get CRLF, throw it away
RTN ;and return