Possible inclusions and fixes for fbForth 2.1... ++Change VMBR and VMBW routines from using symbolic addressing to indirect addressing, where possible, because it is a bit faster. ++Review delays in Speech routines. They seem to be off. **Called delays should probably include the call and return instructions. ++Changed big characters in code from "Small Slant Text" characters to vertical "Small Text" characters. ++Fixed bugs in FONTED **CTRL-D (Load file) is not loading properly and is corrupting the beginning of the loaded file and adding 10.5KiB to the end! [Problem was unaccounted enabling of interrupts.] **CTRL-X (Cut) is not working. [Problem was in FEDLP key evaluation not including >18. It was processed as a normal key!] **Various coding needed cleanup. ++Changes made to FONTED: **Dash (for display)..now entire pattern written instead of just 2 bytes **'<' changed to a left-pointing arrow **Where possible, consolidated character updates that use PDT to BL routine ++Fixed DATA[ because it was not handling line comments ++Change bootup default state for fbForth ISR (maybe) ++Try to improve fbForth ISR code ++Maybe sift through code to optimize 8-bit shifts to use indexed MOVB and SB Rn,Rn or similar ++Added flexible loop structure for BEGIN...WHILE...REPEAT , i.e., multiple WHILE instances are allowed. A failure of any one WHILE will exit the loop to after REPEAT . ++Re-wrote low-level code for KEY **included auto-repeat à la 40/80 column editor's RKEY. **stored auto-repeat long and short repeat times in low memory so the user can change them: -- RH defaults to 900 but can be changed by user at DCT+16..making it odd will disable repeats -- RL defaults to 60 but can be changed by user at DCT+18..it should always be even **changed cursor to inverse of character under cursor ++Re-wrote 40/80-column editor to use fbForth's KEY instead of RKEY to use KEY's new key repeats and inverse-character cursor ++Figure out how to manage dictionary in multiple banks (maybe) ++Write LOADDV80 to allow loading DV80 files like blocks (maybe) ++Put INCLUDE into FBLOCKS (maybe) ++Increase PAD separation from HERE (maybe not) ++Rewrite S0&TIB! to force S0/TIB above HERE ++Rewrote synonym words in resident dictionary to point the pfa of the synonym to the original's PF, but adding 1 to make it odd. An odd pfa will allow the nfa & lfa of the synonym to be found, but allow the cfa to be that of the original word this is a synonym for: **I (synonym for R) **BYE (synonym for MON) **THEN (synonym for ENDIF) **ASM: (synonym for CODE) **;ASM (synonym for NEXT,) isn't handled this way because not in ROM ++Add words **R@ as synonym for R (not doing this one..I is already a synonym..more than one cannot use odd-pfa method above to find nfa & lfa of 2nd+ synonyms!) **EXIT as synonym for ;S **WORDS as synonym for VLIST **2DUP, 2DROP, NIP, TUCK, -ROT, ROLL (maybe) ++Rewrote Joystick word (JKBD) **reduced the table (JTBL) from 48 bytes to 16 bytes **eliminated needing MPY ++UDSQRT **add word to kernel in bank 3 (128 bytes) **perhaps, include in distance calculation ++Rewrote VOCABULARY to **make new vocabulary words immediate, without relying on user to do it! **make VOCABULARY itself immediate ++Check that re-formatting FP constants did not change them (fbForth310_FPL_TRINSIC2.a99) ++Manual Errata/Rewrites: **Insure veracity of any actual addresses listed in the manual -- First available low RAM address **Correct stale website addresses -- webpages.charter.net/nanopeb now nanopeb.com **Review resident vs FBLOCKS locations of words **12.5 rewrite **Document auto-repeat and changing RH (DCT+16) if don’t want it **Word glossary and where described elsewhere in the manual -- S0&TIB! -- >MAP -- VOCABULARY -- DCT (to add that RH is DCT+16 and RL is DCT+18) -- DATA[ (that it allows ( , \ , --> ) -- put SCRFNT in order -- TRAVERSE (removal of trailing terminator bit) -- ABORT" -- JKBD (in resident dictionary now, but Graphics chapter has it wrong!) **9.2 rewrite to include LINK and CRU in first column **Appendix K rewrite with better details **Chapter 8 rewrite with better details **Appendix C rewrite to correct one or more comments -- ABORT" **Appendices A & B rewrite with better details -- Explain that current details are 7-bit ASCII, as reported by KEY -- Add tables for 8-bit ASCII, as stored at >8375 and reported by KEY8 -- Possibly, add to tables the keyboard scan codes as stored at >83C8 ++Re-wrote FPL to use console ROM FP routines, when available, and only use FPL when GPLLNK would be involved: **F+, F-, F*, F/, F<, F=, F> **included usage of console ROM FP routines for all transcendental functions. **maybe F0=, F0< **re-work use of @EXP and @FPSIGN words to use console's @EXP (>8376) ***CHECK THIS!!*** 2 bytes and @SIGN (>8375) 1 byte, if possible. ***FOR BYTE VS. WORD USAGE*** **re-wrote _F$ by removing one instruction and modifying another. **instituted a return stack for FPL routines (only one routine, CNSTIN, required special care to insure return of CPU status register) **Rewrote FROT to more compact and efficient ++Maybe re-write FPL transcendental routines to replace TI polynomial coefficients with my polynomial coefficients if refitting the relevant series equations compares better with known tables. ++Re-wrote SGN from--- SGN DATA $+2 MOV *SP,R0 ; get top of stack JEQ SGN02 ; exit if 0 JLT SGN01 ; jump if negative LI R0,1 ; set to +1 MOV R0,*SP ; replace top of stack JMP SGN02 ; jump to exit SGN01 SETO *SP ; set to -1 SGN02 B *NEXT ; exit to--- SGN DATA $+2 MOV *SP,R0 ; get top of stack JEQ SGN02 ; exit if 0 JLT SGN01 ; jump if negative CLR *SP ; set top of stack INC *SP ; to 1 JMP SGN02 ; jump to exit SGN01 SETO *SP ; set to -1 SGN02 B *NEXT ; exit ++Re-wrote 0 compare functions: **0=, 0<, 0> ++Re-wrote WLITERAL from : WLITERAL ( --- [] | [addr] ) ( IS: ) BL STATE @ IF COMPILE SLIT TOKEN ELSE TOKEN THEN ; IMMEDIATE to : WLITERAL ( --- [] | [addr] ) ( IS: ) BL STATE @ IF COMPILE SLIT THEN TOKEN ; IMMEDIATE ++Review other definitions for improvements like above for WLITERAL ++Maybe use XB random-number generator for FRAND. Current free space in ROM banks: **bank 0: 104 bytes **bank 1: 300 bytes **bank 2: 192 bytes **bank 3: 1334 bytes