REM -------- Display Printing & Graphic Characters -------------------\ \ Program - KPCHRSET.BAS \ \ Language - CBASIC compiler (CB80) \ \ Vers 1.1 \ \ Simply displays the printing characters equivalent to \ the CHR$(33) thru CHR$(255) for the Kaypro video models.\ \ Copyright (c) 24-Jun-85 by Steven L. Sanders \ Tampa Bay KUG \ 14 Cypress Drive \ Palm Harbor, FL 33563 \ \ Portions (c) 1983 by Digital Research \ \ Note - CHR$(26) is clear screen/home cursor \ CHR$(30) is home cursor \ and most others below 30 are control chrs \ \ -------------------- constants ------------------------ clr% = 01ah eos% = 017h eol% = 018h esc% = 01bh formfeed% = 0ch formfeed$ = CHR$(formfeed%) clr$ = CHR$(clr%) eos$ = CHR$(eos%) eol$ = CHR$(eol%) esc$ = CHR$(esc%) carriage.return% = 0dh cr$ = CHR$(carriage.return%) bell$ = CHR$(07) backspace% = 08h backspace$ = CHR$(backspace%) bs$ = CHR$(backspace%) space$ = " " null$ = "" REM ----------------- kaypro graphic routines ---------------------- inv.on$ = esc$ + "B0" REM inverse video ON inv.off$ = esc$ + "C0" REM inverse video OFF half.on$ = esc$ + "B1" REM half intensity ON half.off$ = esc$ + "C1" REM half intensity OFF blink.on$ = esc$ + "B2" REM blinking ON blink.off$ = esc$ + "C2" REM blinking OFF under.on$ = esc$ + "B3" REM underline ON under.off$ = esc$ + "C3" REM underline OFF cur.on$ = esc$ + "B4" REM cursor ON cur.off$ = esc$ + "C4" REM cursor OFF save.cur$ = esc$ + "B6" REM save current cursor position rest.cur$ = esc$ + "C6" REM restore cursor position stat.on$ = esc$ + "B7" REM enable status line stat.off$ = esc$ + "C7" REM disable status line pos.cur$ = esc$ + "=8 " REM load cursor to col 1 line 25 REM ----------------- Kaypro line drawing routines ----------------------- line$ = esc$ + "L" REM enable line drawing mode REM these will draw a line around the outside edges of the screen \ creating a box effect. draw 1-3 first, add any other print \ statements before finishing with line4$ line1$ = line$ + CHR$(33) + CHR$(33) + CHR$(33) + CHR$(190) line2$ = line$ + CHR$(33) + CHR$(190) + CHR$(130) + CHR$(190) line3$ = line$ + CHR$(130) + CHR$(190) + CHR$(130) + CHR$(33) line4$ = line$ + CHR$(130) + CHR$(33) + CHR$(33) + CHR$(33) REM ------------------------- functions -------------------------- REM position cursor DEF fn.cursor$(v%,h%) PRINT esc$ + "=" + CHR$(v%+32) + CHR$(h%+32); RETURN FEND REM this function will center a string DEF fn.center%(data$) center% = (80 - LEN(data$))/2 PRINT TAB(center%);data$; RETURN FEND REM clears entire screen incl status line DEF fn.clear.all% PRINT stat.off$; PRINT clr$; RETURN FEND REM turns up a clean page under header string DEF fn.nuscreen% PRINT FN.CURSOR$(3,0);eos$; RETURN FEND REM simple time delay DEF fn.delay% FOR delay1% = 1 TO 300 FOR delay2% = 1 TO 2000 NEXT delay2% NEXT delay1% RETURN FEND REM ------------------------ program begins ------------------------ info: dummy% = fn.clear.all% PRINT cur.off$+save.cur$+line1$+line2$+line3$+rest.cur$ PRINT:PRINT:PRINT\ " Just a reminder that users with John Smith's ZCPR2 or" PRINT:PRINT\ " ZCPR3 need to enter GRAF first before running program." PRINT:PRINT:PRINT\ " Kaypro 10 users with BIOSMMR need to enter:" PRINT:PRINT\ " KSTAT CON=GRAPH" PRINT:PRINT:PRINT\ " If the border line looks funny and is only drawn on half" PRINT:PRINT\ " your screen, you need to follow the above directions." PRINT:PRINT:PRINT\ " Steven L. Sanders (c) 24-Jun-85" PRINT line4$ dummy% = fn.delay% FOR scroll% = 1 TO 25 REM do a Wordstar-style scroll-off FOR slow% = 1 TO 1000 NEXT slow% : PRINT : NEXT scroll% PRINT cur.on$; start: group% = 1 line% = 1 dummy% = fn.clear.all% PRINT " "+inv.on$ + \ " +++ Kaypro Printing & Graphic Characters Display +++ " + inv.off$ PRINT:PRINT:PRINT\ " Display (A)SCII set, (G)raphic set, or (Q)uit? "; answer% = INKEY IF UCASE$(CHR$(answer%)) = "Q" \ THEN PRINT "Quit":PRINT:PRINT:STOP IF UCASE$(CHR$(answer%)) = "A" \ THEN x% = 33 : y% = 126 :\ dummy% = fn.clear.all% :\ PRINT " "+inv.on$ + \ " +++ Kaypro ASCII Printing Characters 33 thru 126 +++ " + inv.off$:\ GOTO display IF UCASE$(CHR$(answer%)) <> "G" \ THEN GOTO start x% = 127 y% = 255 dummy% = fn.clear.all% PRINT " "+inv.on$ + \ " +++ Kaypro Graphic Characters 127 thru 255 +++ " + inv.off$ display: PRINT cur.off$; dummy% = fn.nuscreen% FOR char% = x% TO y% REM begin loop PRINT x%;"= ";CHR$(char%);" "; x% = x% + 1 REM increment chr integer group% = group% +1 REM increment group integer IF group% = 8 \ REM print 7 to a line THEN group% = 1:\ line% = line% + 1:\ PRINT:PRINT REM and turn up a blank in between lines IF line% = 11 \ REM print 10 lines per screen THEN line% = 1:\ PRINT blink.on$+" [ press any key ]"+blink.off$;:\ dummy% = INKEY:\ REM wait for keypress dummy% = fn.nuscreen% REM start new page under header NEXT char% REM get next chr PRINT:PRINT:PRINT:PRINT\ blink.on$+" [ press any key ]"+blink.off$; dummy% = INKEY PRINT cur.on$ GOTO start REM --------------------- that's all folks ... -------------------------