Jump to content

TheBF

+AtariAge Subscriber
  • Content Count

    2,657
  • Joined

  • Last visited

Community Reputation

2,862 Excellent

About TheBF

  • Rank
    River Patroller

Profile Information

  • Gender
    Male
  • Location
    The Great White North
  • Interests
    Music/music production, The Forth programming language and implementations.
  • Currently Playing
    Guitar
  • Playing Next
    Trumpet ;)

Recent Profile Visitors

6,677 profile views
  1. But if you are "missing the link" what could you do? You would need to make an editor loop like one does in other language I guess. You would put KEY() in a loop with control key values doing GOSUBs to various cursor control routines and placing valid ascii chars on the screen at the cursor position. The most difficult thing for XB would probably be inserting and deleting although you might be able to use SEG$() and DISPLAY AT() to good effect but it might still be painful on a really long string. It's pretty good with this string length. 100 A$="NOW IS THIS TIME FOR ALL GOOD MEN TO COME TO THE AID OF THEIR COUNTRY. I don't know what happens when the string gets very long? " 110 CALL CLEAR 120 FOR I=LEN(A$)TO 1 STEP -1 130 DISPLAY AT(1,1):SEG$(A$,I,LEN(A$)-I) 140 NEXT I 150 GOTO 110
  2. "It takes nine months to have a baby no matter how many women you put on the job." (Fred Brookes, The Mythical Man Month) Well actually my newest granddaughter arrived in 8 months plus one week, about 2 weeks ago and she is really cute. Unlike little baby Ivory, my documentation for the linker took longer than it should but here it is. I included @FarmerPotato 's disk with some additions of my own to aid in the getting used to this beasty. I have been testing on an unreleased version of Camel99 (2.68F) but it should work on the latest released version. Maybe it is of some use to someone out there. :) Erik I believe your original question was because you have some bit map graphics code that you want to run under Forth. If you want to post it here I can take a run at making it work (if it assembles with the standard TI Assembler) LINKER99.zip
  3. Just curious about what compiler this is and could it be some kind of un-intended optimization bug?
  4. Sometimes maintenance is worthwhile. I had hacked together a version of -TRAILING like this. (-TRAILING removes trailing spaces from a string) CODE -TRAILING ( addr len -- addr len') *SP W MOV, \ DUP addr in W TOS W ADD, \ add len R1 2000 LI, \ R1 holds the space character W DEC, \ w=address of last char BEGIN, *W R1 CMPB, \ compare to ascii >20 EQ WHILE, W DEC, \ move back 1 char TOS DEC, \ dec len in TOS REPEAT, TOS 0 CI, 1 JGT, TOS CLR, NEXT, ENDCODE Looking at it I didn't like having two DEC instructions inside the loop and I really didn't like the negative length test at the end. This is about 13% faster. It seems to test solidly. HEX CODE -TRAILING ( addr len -- addr len') *SP TOS ADD, \ add len TOS DEC, R1 2000 LI, \ R1 holds the space character BEGIN, *TOS R1 CMPB, \ compare to ascii >20 EQ WHILE, TOS DEC, \ move back 1 char REPEAT, *SP TOS SUB, TOS INC, NEXT, ENDCODE
  5. Have the heads, pinch-roller and capstan been cleaned?
  6. Obsessed with SAMS I have managed to take out 4 more bytes per definition. Two in SAMS memory and two in the forth Dictionary entry. I removed the GOTO SAVEHERE line and replaced it with FARSEMIS. This is a run-time exit from a SAMS definition so it can go in SAMS memory at the end of a definition. The caller's IP address is pulled from the return stack so that's that. Changing the dictionary pointer is a compile time complication so that is handled by ;FAR when we compile a new SAMS word. My ultimate goal here is to get the entire FAR: definition living in SAMS memory and then modify FIND to search through SAMS banks first in declining order before searching Forth. This will make FAR: definitions look similar to ANS Forth wordlists but we can have a lot more of these SAMS lists than wordlists. I only have room for 9 in the kernel. I have also moved my INCLUDE line buffer into high RAM. I was using PAD but when INCLUDEing into a SAMS block PAD is in the SAMS memory and so it prevents using the last 127 bytes of the SAMS bank. The other thing that is interesting is how compact headless Forth code is. All these files compiled into 4K with 380 bytes to spare. Of course there was another 1800 bytes of header code over in CPU RAM. (I need to make a way to leverage this idea to create headless programs that can be saved as EA5 images.) DECIMAL 240 SETBANK HEX INCLUDE DSK1.ELAPSE INCLUDE DSK1.UDOTR INCLUDE DSK1.ANSFILES INCLUDE DSK1.CATALOG INCLUDE DSK1.DIR INCLUDE DSK1.MORE INCLUDE DSK1.BUFFER INCLUDE DSK1.COMPARE INCLUDE DSK1.CASE INCLUDE DSK1.VALUES INCLUDE DSK1.TRAILING INCLUDE DSK1.SYNONYM INCLUDE DSK1.3RD4TH INCLUDE DSK1.MALLOC INCLUDE DSK1.VDPMEM INCLUDE DSK1.FASTCASE INCLUDE DSK1.ASMLABELS INCLUDE DSK1.GRAFIX INCLUDE DSK1.DIRSPRIT INCLUDE DSK1.COOLSPRITE
  7. How much of the 64K ROM space does Stevie use. Asking for a friend... (that's an enviable code space)
  8. I updated the code above to remove the HOLDER buffer and just used PAD. Then I realized if you wanted to, the compiler could just put the bytes directly into VDP RAM in the pattern table. You just replace C, with VC, Then you just need a word to set the VDP memory pointer to the correct location in the pattern table for the character you want to change. This code does that. So no CPU RAM is used to hold the patterns. The downside of course is that the patterns have to be re-compiled each time you want them. But I see this as simple way to design patterns on real iron.
  9. I was doing some folder housekeeping and found something I tried to do a long time ago. I guess I have learned something over the last few years because it was clear to me that it was all wrong. The objective was to make a character pattern compiler the lets you "draw" your character patterns in text in your source code like these examples. CREATE BIG-O \ 01234567 | **** | | * * | | * * | | * * | | * * | | * * | | * * | | **** | CREATE SQUARE \ 01234567 | ********| | ********| | ********| | ********| | ********| | ********| | ********| | ********| The better idea was to convert a string of asterisks and spaces into a string of ones and zeros. A string of ones and zeros can be "evaluated" by Forth as a binary number. That number can then be compiled into memory as one byte of a pattern definition. It's not nearly as fancy as a program that let's you draw on the screen but its a heck of lot easier than HEX bytes in a string. Here is the code with the examples above. Code Edit: Removed HOLDER buffer and used PAD instead. Saves bytes
  10. I am confused. (No shock there) Are we talking about file "pipes"? Pipelining to me is a technique in CPU design where you make an instruction pipeline so you can minimize stalling the CPU. If we are talking about pipes then as you say MSDOS later versions had pipes without multi-tasking. I am not certain of the exact mechanism used. (Temporary files as output/input buffers?) This sounds like something I should add to the Fox Shell with some filter programs. hmm... 🤔 with multi-tasking too.
  11. Could you get/put a low resistance shunt somewhere and compute the current?
  12. So I did a benchmark program in two versions. One that lives in completely in CPU RAM. The 2nd has the outer loop in SAMS F9 but the inner loop is in SAMS F8. This forces a cross SAMS page call. Here is the code. The screen shots tell the tale. Pages were toggling... Speed is VERY good.
  13. I have something that seems useful now although some code that I have in my libraries breaks when loaded in SAMS. Need to understand why. This version runs faster because MAPPER is now smart and does not map in a SAMS page if it is already in memory. I will do a benchmark comparison between CPU RAM and SAMS memory. Here is the code Here is a test suite using a SAMS wordlist to hold a the SAMS version of : and ; plus all the SAMS words. COMPILE-2-SAMS.mp4
  14. Maybe that's the trap that could be installed in this new BASIC interpreter. GOTO inside a FOR/NEXT structure throws an error. ?? We have to start reigning-in the bad habits of BASIC programmers somehow. :) (It's a joke. Don't kill me)
  15. "Bug for bug compatibility"
×
×
  • Create New...