1) direct escape code
2) SMG$
3) curses (C API but can be called from other languages)
4) find a third party library
I was very impressed by SMG$ in the late 80's. Not so much after that.
And curses besides the language issue is even worse.
So direct escape code or a third party library.
Added in 18 minutes 13 seconds:
Example direct escape code:
Code: Select all
program box1
declare integer i
external sub clrscr
external sub print_abs(integer, integer, string)
call clrscr
call print_abs(10, 20, "This is a test")
call print_abs(23, 1, "")
end program
!
sub clrscr
print chr$(155) + "2J"
end sub
!
sub print_abs(integer row, integer col, string txt)
print chr$(155) + str$(row) + ";" + str$(col) + "H" + txt
end sub
Added in 20 minutes 25 seconds:
Example using my old scr.mar code:
Code: Select all
program box2
external sub scr_clr
external sub scr_put_txt(integer, integer, string, integer)
external sub scr_exit
call scr_clr
call scr_put_txt(10, 20, "This is a test", 0)
call scr_put_txt(23, 1, "", 0)
call scr_exit
end program
Just say if you want a copy.
It got some goodies:
; SCR_APP ( )
; SCR_ASCIIFONT ( )
; SCR_BEL ( )
; SCR_BOX ( ROW , COL , HEIGTH , WIDTH )
; SCR_CLR ( )
; SCR_CUR_OFF ( )
; SCR_CUR_ON ( )
; SCR_DEL_LIN ( ROW )
; SCR_DEVTYP ( TYP )
; SCR_FLU_TXT ( ROW , COL , TXT_STR , ATTR )
; SCR_GET_KEY ( ROW , COL , KEY )
; SCR_GET_LIN ( LIN_STR , ACTLEN , PMT_STR )
; SCR_GET_MSG ( MSG , MSGLEN , OK )
; SCR_GET_PW ( LIN_STR , ACTLEN , PMT_STR )
; SCR_GET_TXT ( ROW , COL , LIN_STR , ACTLEN , PMT_STR )
; SCR_HIT ( )
; SCR_HOR_LIN ( ROW , COL , LENGTH )
; SCR_NOTRAP ( )
; SCR_PUT_BIGTXT ( ROW , COL , TXT_STR , ATTR )
; SCR_PUT_LIN ( LIN_STR )
; SCR_PUT_TXT ( ROW , COL , TXT_STR , ATTR )
; SCR_RETRAP ( HANDL )
; SCR_SCROLL ( NLIN )
; SCR_SETSCROLL ( FIRST , LAST )
; SCR_SOFTFONT1 ( )
; SCR_SOFTFONT2 ( )
; SCR_TRAP ( HANDL )
; SCR_VER_LIN ( ROW , COL , LENGTH )
; SCR_WHERE ( ROW , COL )
; SCR_WID_132 ( )
; SCR_WID_80 ( )
Added in 5 minutes 47 seconds:
BTW, I am curious why you picked Basic.
It is a pretty good Basic and people who used Basic on PDP-11 or VAX know it, but it is very different from various MS Basic (GW Basic, QBasic, VB6/VBA/VBS, VB.NET etc.).
Fortran, Pascal and C is more "like on other platforms" (even though Pascal was missing on the student system last I checked - which is a shame)