Windows By Shade, Part 4

Third is the data entry block which is the compiled machine code part of the data entry routine from address 60899 to 62298. This is the TIMEX BASIC part of the data entry routine that was correctly compiled by the TIMACHINE compiler and ran properly. This compiled machine code part of the data entry routine will be referred to from this point on as “Part #1 of the data entry routine”. The remainder of the data entry routine, the TIMEX & LKDOS extended BASIC windows routines are in the CORE ROUTINES section from program lines 9889 to 9926. This TIMEX & LKDOS extended BASIC part of the data entry routine will be referred to as “Part #2 of the data entry routine”. The complete data entry routine does six special operations which make it better than just a straight INPUT or INKEY$ data entry operation. First it provides three cursors for data entry. it provides an “L”, “C” & “>” cursors. Second it provides for three data entry modes.

These data entry modes are <1> All CHARACTERS mode. In this mode all the alpha-numeric characters, punctuation and symbols can be entered. Both upper and lower case letter characters can be entered by shifting the cursor with the standard CS + 2 keys, from L to C and vice versa. <2> CAPITOLS mode. In this mode all the upper case letters, numbers, punctuation and symbols can be entered with the exception of lower case letter characters which are locked out. The C7 cursor will not shift to an L cursor in CAPITALS mode. <3> NUMBERS ONLY mode. In this mode only numbers can be entered. This mode uses the > cursor. This data entry made eliminates the need of having a numbers only checker routine in the CORE ROUTINES. This data entry mode makes entering dates / times / amounts simple and foolproof. Third extended mode is locked out so those characters which are usually entered from extended mode are entered using the SS key plus the character key related to that extended mode character. Pressing the SS + Y keys enters “[“, SS + U keys enters J, SS + F keys enters “(“, SS + G keys, enters “)” & SS + I keys enters “@”.

Fourth the arrow keys and all non-character ( commands or functions ) entries are locked out.

Fifth the data entry line length is preset by the IMPLEMENTATION PROGRAM and the data entry routine prevents entry of characters beyond the preset line length limit. Sixth the data entered into a line is POKEd into a 64 character storage buffer. This 64 character storage buffer holds one full screen row / line of 64 characters. When data entry on a line is completed the data is PEEKed from the 64 character storage buffer and placed into a STRING$ variable by a GOSUB from the IMPLEMENTATION PROGRAM to a CORE ROUTINE. Then the 64 character storage buffer is cleared with the fourth machine code routine, the 64 character storage buffer clearing routine. The 64 character storage buffer clearing routine is initiated from the IMPLEMENTATION PROGRAM. The data entry routine has many other features, but those noted above should make my point that this is a worth while project which should be completed.

Fourth is the 64 character storage buffer clearing routine from address 62304 to 62369. This routine CLEARs the 64 character storage buffer used to temporarily store a line of 64 characters by part #1 of the data entry routine,

Fifth is the screen PRINTing parameters storage buffer from 62375 to 62385. This buffer stores <1> Last character entered. <2> Current pixel column position. <3> Data entry mode, <4> Window in use. <5> Start / base pixel column position. <6> Start / base pixel row position. <7> Characters per line limit. <8> Ink color for PLOT function. <9> Line numbers to return to. <10> LKDOS DRAW function character erase width, <11> Current status of C or L cursor.

Sixth is a one number storage buffer at 62390 that holds the current number of characters stored in the 64 character storage buffer.

Seventh is the 64 character storage buffer from address 62391 to 62454. Part #1 of the data entry routine temporarily stores one line of up to 64 characters in this buffer.

Eighth is the fonts storage area from 62460 to 65535. This area regularly stores four mixed TIMEX & LKDOS fonts. The standard complement of fonts starts with <1> LKDOS 45 (approximate ) character per line proportional italic font starting at 62460. <2> LKDOS 42 character per line font starting at 63229. <3> TIMEX bold 32 character per line font starting at 63998. <4> TIMEX graphics 32 graphics (icons) per line font starting at 64767.

There is a fifth font which is an LKDOS 64 character per line font which is LOADed into the LKDOS cartridge.

As noted above there are two versions of my LKDOS extended BASIC data entry demo programs. The simplest is the pseudo three window demo. The pseudo three window demo uses all the same TIMEX & LKDOS operations as the true three window demo but uses only one LKDOS extended BASIC window. The true three window demo is identical to the pseudo three window demo except it uses all three LKDOS extended BASIC windows.

The only noticeable difference the user would detect between the two versions of the data entry demos is that the true three window demo has a slower typing speed than the pseudo three window demo. This is due to the failure of the TIMACHINE compiler to produce runnable machine code from those program lines, of the original one part data entry routines, that contained LKDOS extended BASIC window operations. My original plan was to write the data entry routines in TIMEX & LKDOS extended BASIC, test and modify them until-I was satisfied with their performance and then compile the data entry routines to faster running machine code with the TIMACHINE Compiler. This is what I did, and after several weeks testing and modifying the data entry routines, and When I was satisfied with their performance I compiled them with the TIMACHINE compiler. When I went to run the compiled machine code routines I found that those operations containing LKDOS extended BASIC window functions had not been properly compiled by the TIMACHINE compiler and would not run.

Directly below is a list of the LKDOS extended BASIC window operations that the TIMACHINE compiler did not compile correctly, and which would not run at all.

<1> PRINT #4: DRAW (4*DL),8,0 — (DL=Character width to be erased — MIN.1. MAX. 2)
<2> PRINT #5;CHR$ B; or PRINT #6;CHR$ B; or PRINT #7;CHR$ B;
<3> PRINT #5; “^”: or PRINT #5;”_”: or PRINT #6;”^”: or PRINT #6;”_”: or PRINT #7; “^” or PRINT #7;”_”:
<4> PRINT #5;””: or PRINT #6;””: or PRINT #7;””:

There are only three types of LKDOS extended BASIC window routines used by the data entry routine. These are <1> PRINT #4: DRAW (4*DL),8,0. <2> PRINT #5;CHAR$ B;. <3> PRINT #5;”^”:.

Robert Shade
[address omitted]

Demo programs excerpted Timex & LKDOS extended BASIC part #2 data entry routine

9889 RANDOMIZE USR RN
9890 LET BG=PEEK 62383: LET CW=PEEK 62378: LET CU=PEEK 62385: LE T CS=PEEK 61377: LET A=PEEK 62376: LET B=PEEK 62360
9891 IF CW=1 THEN PRINT#4: POKE 16005,A: PRINT #4: POKE 16006, B: GO TO 9894
9892 IF CW=2 THEN PRINT #4: POKE 16025,A: PRINT #4: POKE 16026, B: GO TO 9894
9893 IF CW=3 THEN PRINT #4: POKE 16045,A: PRINT #4: POKE 16046, B:
9894 IF BG=1 THEN GO TO 9914
9895 LET FIPEEK 62380i LET M=VEEK 62382: PLOT INK H;A,F: LET DL=PEEK 62304
9896 PRINT #4: DRAW (4*DL)18,0:
9898 IF BG=2 THEN GO TO 9902
9899 IF BG=3 THEN LET RN=61872: GO TO 9889
9900 IF BG=4 THEN -GO TO 9906
9901 IF BG=5 THEN LET RN=60899: GO TO DR
9902 LET B=PEEK 62375
9903 IF CW=1 THEN PRINT #5;CHR$ B;: GO TO 9917
9904 IF CW=2 THEN PRINT #6;CHR$ B;: GO To 9920
9905 IF CW=3 THEN PRINT #7;CHR$ B;: GO TO 9923
9906 IF CW=2 THEN GO TO 9910
9907 IF CW=3 THEN GO TO 9912
9908 IF CU=O THEN PRINT #5; "Al : GO TO 9926
9909 IF CU=1 THEN PRINT #5;"_": GO TO 9926
9910 IF CU=O THEN PRINT #6;"A': GO TO 9926
9911 IF CU=1 THEN PRINT #6;"@": GO,TO 9926
9912 IF CU=O THEN PRINT #7;""": GO TO 9926
9913 IF CU=1 THEN PRINT #7;".": GO TO 9926
9914 IF CW=1 THEN GO TO 9917
9915 IF CW=2 THEN GO TO 9920
9916 IF CW=3 THEN -GO TO 9923
9917 IF CS=O AND CU=O THEN PRINT #51"Al : GO TO 9926
9918 IF Ci=O AND CV=t OR CS=1 THEN PRINT #5;0-': GO TO 9926
9919 IF C8=2 THEN @PRINT #5;"': GO TO 9926
9920 IF CS=O AND tUiO THEN PRINT #6; HAI: GO TO 9926
9921 IF CS=O AND CU=1 OR CS=1 THEN PRINT #6;'.': GO TO 9926
9922 IF CS=2 THEN PRINT #6;'": GO TO 9926
9923 IF CS=O AND CU=O THEN PRINT #7; "Al ; GO TO 9926
9924 IF CS=O AND CU=1 OR CS=1 THEN PRINT #7;'.': GO TO 9926
9925 IF CS=2 THEN PRINT #7;""
9926 LET RN=62141: GO TO 9689

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.