Jump to content
GDMike

Foxit - in progress

Recommended Posts

16 hours ago, GDMike said:

I'm using classic 99, I haven't had time to look at the debugger either...my bad.

We don't recommend the debugger to be pedantic - it's there to save you time by showing you the answer that you are trying to gain by inference. :)

 

You'll have more time for other things that way!

 

  • Like 3

Share this post


Link to post
Share on other sites
11 hours ago, Lee Stewart said:

 

TurboForth, however, does not have dictionaries (fbForth, TI Forth, CAMEL99 Forth do). TurboForth does have something @Willsy calls Applications Support, which he says is similar, so you may want to read up on that and he will be along to help, shortly, I am sure. :)

 

...lee

Kind of... similar... I guess;-) Applications support allows you to 'seal' the dictionary so that only selected words that you choose can be 'exposed' to the Forth system and therefore used in other applications. So it's quite good for writing libraries for instance - you only expose the top-level words/functions that the user will interact with; all the internal supporting words of the library are hidden and cannot be accessed.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
On 1/25/2022 at 2:12 AM, Tursi said:

We don't recommend the debugger to be pedantic - it's there to save you time by showing you the answer that you are trying to gain by inference. :)

 

You'll have more time for other things that way!

Right on. I did glance at someone else's debugger screenshot and it did show the 1 line hit but I myself didn't do that and i should have. I think at that moment I was getting to a point of moving more and more to a TF environment and just deciding to change up.

But for sure, using that correctly is the best thing next to pizza. 

 

TurboForth, however, does not have dictionaries (fbForth, TI Forth, CAMEL99 Forth do)..

 

I've not seen info on this in my TF docs. I'll be reviewing. Thank you

 

Edited by GDMike

Share this post


Link to post
Share on other sites
On 1/3/2022 at 1:56 PM, GDMike said:

Good question. We were discussing early on on wether or not to do this in Forth, and since I already had SAMs function understood in assy. and I already had an understanding of the TIpi clock routine in assy. 

And not having that part in forth was was my turning point. BUT...I agreed that if I ran into a road block that I would turn to Forth.

The funny part is I had promised myself one more assy. program before going back to Forth again. I mean I could probably, maybe, as I can't say, but mos likely would have figured it out in Forth. As I'll have to in the future. 

But the good news is I'll be heading into forth as soon as Foxit is done. But mostly just to pick up those tools I described. Now Foxit definitely doesn't need speed as it's not relying on that to perform, so it's definitely something I may convert or rewrite in forth. At least I get a feel for it this way.

Now I'll put this out there, as far as Forth and SAMs use, I personally think forth uses SAMs banks up faster than assy does. But that is from my experience and there's a good chance my words in forth may have a weight problem. 

But, yeah. That's basically why.

Hi Mike, this is your extremely old buddy RetroBill (FDOS) checking up on you.  I've scanned through your AL coding attempts; so very boring, as you minimise your time reading manuals believing you'll figure it out as errors occur.  Fortunately, you get lots of help here on AtariAge.  You do accomplish a lot, just very slowly.  I also noticed that you have a Win 10 laptop, and two F-18A TI-99/4A's that you installed yourself.  Putting the TI back together was the hard part for me, as I also have two TI--99/4A's, both with USB keyboard, so my two TI-99/4A consoles work on my 4 port KVM using common monitor and PC wireless keyboard.  However, you don't seem to have your old Geneve back, yet.  Do you still intend to do so, and complete MDOS Forth+ as agreed?

  • Like 1

Share this post


Link to post
Share on other sites
On 1/9/2022 at 1:47 PM, GDMike said:

Thank you, yes. I have played with, hmm.. maybe it was gees.. I've forgotten the word... C save, F save, I can't remember what the heck it was now in FB forth...it's been a couple 3 years now...

 

But good to know what to be looking for.. with that fast load.

I'm still compiling, "can I use that word," the assembler, I'm getting typos.. where"0" and "O"s happen.. and last check, some error...

I had to type it in since I don't have internet where I was last night, but I had the booklet I made a few years back and just killing time, typed it in, Also HELPS to understand some things..

I'll grab the block image of it while I'm home and before heading out tonight on another long shift.. and I'll just forthit tonight.

 

Ok, what happened to Foxit..

I ran out of program space, Unless I included the supercart space, which I haven't, and I'm not sure that would satisfy my needs.

I have SAMs running and in order to drop in or to get standalone routines into SAMS banks well SAMs has to be running and the mapper running, it's just I wanted to be able to read a DF 80 file and push thatbto a SAMs bank, but it's not working out and that procedure has gotten over my head..

Now, im able to pull in at boot up, a help file of 192 bytes, and push it to SAMs bank >E0, and since the help file is self executing, and self exiting, it was all painless, but my temporary vram for doing that is only good for a 1 time process and it's not something I can do after Foxit is further in process. So I was thinking I could just read a DF80 and push it directly to SAMs, but I guess the file needs to be a program image type file and not a DF 80 type.

I'm guessing here, but otherwise I think it's just ASCII code. But I've given it a break, and maybe I need Forth because SAMs is already set immediately rt off the bat and maybe I can avoid that situation through Forth.

Plus, I wanted to finish Foxit and get back into forth and my time was expiring in assembly... if this, pulling in assembly code to SAMs, was More straight forward, I might have been done..

No love lost, it's a learning curve anyway.

I don't mind the problems, but not finding a work around isn't fun .

 

 

 

 

Me, myself and I don't understand why you didn't do it in forth to begin with, as you can use the TI forth assembler in SAMS or better yet, just do short AL words, as needed, in forth using HEX code!  Quick and easy, as you can use your method  to test immediately, and learn as you go.  One more question; where did you get the F-18A's?  I bought mine years ago, and didn't think any more were made as a replacement was planned.

Edited by Bill R Sullivan
left out an important question
  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, Bill R Sullivan said:

One more question; where did you get the F-18A's?  I bought mine years ago, and didn't think any more were made as a replacement was planned.

 

See this thread, Bill:  

 

 

...lee

 

  • Like 2

Share this post


Link to post
Share on other sites
2 hours ago, Bill R Sullivan said:

why you didn't do it in forth to begin with

Hi Bill, nice to hear from you. Happy new year!

Yes, Know I should of started with Forth, BUT I actually knew more in assembly than Forth..so your response is, that's a better reason. Lol right. Well, I wanted it to be up and running before the new year and I almost made it. 

So here we are, in TF. BUT this is probably going to be long drawn out as it's more of a learning tour I think now. And I don't have anything against that for sure, as I'll benefit.

Thx for chiming in. 

And see Lee's response regarding F18As. Until Matt puts out ..MK2.. this works from Han in Germany.

 

 

 

Share this post


Link to post
Share on other sites

Just an hint for your database project.

Take a look at the definition of RECORD that I made in the topic about arrays.

That's how you make records in a block file.

 

I'm just sayin... :) 

  • Thanks 1

Share this post


Link to post
Share on other sites

: KY KEY? 0 > IF THEN $8375 @ 11 = IF UP ... And so on and so on for my  directional keys.

 

(Forgive me if 11 isn't the UP fctn key), this could have been moving a sprite character. I just grabbed the code to show how I'm handing my key input).

 

 

 

Edited by GDMike

Share this post


Link to post
Share on other sites

I'll think about

80 CONSTANT MAX_STRING_LENGTH
255 CONSTANT BYTES_PER_BUFFER

I'll adjust this to match with what I'm doing. 🤔

None of my fields can exceed 255 bytes, unless I created a "BLOB" field and I'm not.

 

And none can exceed 80 characters per Screen line, depending where on the screen the field is placed, it's more than likely going to be less than 80 but we have to allow for the full 80.

 

 

 

Edited by GDMike

Share this post


Link to post
Share on other sites

I thought might be able to help your project with some modern structures used in Forth these days.

Here is the structure code and a demo structure definition.

 

And while I was at it I thought I would demonstrate a way that you can use block files as a database.

It might give you some new insights on how you could do the bottom end of your database.

Spoiler
\ forth 2012 structures with TurboForth Harness   B Fox 2022
\ A.15 The optional Facility word set

\ TF Harness
: ALIGNED  1+ $FFFE AND ;
: PLACE   ( src n dst -- ) 2DUP C! 1+ SWAP CMOVE ;

\ =============================================================
\ these 2012 Forth words are not 100% necessary, but people like them
DECIMAL
: BEGIN-STRUCTURE  \ -- addr 0 ; -- size
   CREATE
     HERE 0 0 ,        \ mark stack, lay dummy
   DOES> @             \ -- rec-len
;

: END-STRUCTURE  \ addr n --
   SWAP ! ;      \ set len

\ simplest FIELD creator
: +FIELD  \ n <"name"> -- ; Exec: addr -- 'addr
   CREATE OVER , +
   DOES> @  +
;

\ define forth 2012 field types for TI-99
: FIELD:   ( n1 "name" -- n2 ; addr1 -- addr2 ) ALIGNED 1 CELLS +FIELD ;
: BYTE:   ( n1 "name" -- n2 ; addr1 -- addr2 )          1 CHARS +FIELD ;

\ BF custom field types
: DFIELD:  ( d1 "name" -- d2 ; addr1 -- addr2 ) ALIGNED 2 CELLS +FIELD ;
: CELLS:  ( n --)  CELLS +FIELD ;
: CHARS:  ( n --)  ALIGNED CHARS +FIELD ;


\ ===================================================================
\ example: using [ ] brackets as a naming convention
\ to identity record and fields
DECIMAL

BEGIN-STRUCTURE ID-RECORD ( returns the size of an ID record )
       FIELD: ID#]
    32 CHARS: NAME]
    32 CHARS: FAMILY]
    64 CHARS: ADDRESS]
    32 CHARS: CITY]
    15 CHARS: PROV]
    25 CHARS: COUNTRY]
    10 CHARS: PHONE#]
    10 CHARS: AREACODE]
END-STRUCTURE

VARIABLE REC#
: RECORD     REC# ! ;  \ set the active record


\ blocks are 1024 bytes so records should be even multiple
\ 1024, 512, 256, 128, 64, 32
\ ID-RECORD is 224 bytes so use 256 as the record size
 256 CONSTANT REC_SIZE
1024 CONSTANT BUFF_SIZE
   0 CONSTANT 1STBLOCK   \ set YOUR first block to use for database

\ *** needs an open block file to work ***
\ This is the magic part:
\ */MOD multiplies rec# x record_size / block_size
\ it returns: offset and block#
: [EMPLOYEE ( -- buffer_addr)
  REC# @ REC_SIZE BUFF_SIZE */MOD  1STBLK +  BLOCK + ;

\ load a dummy record
 1 RECORD
  9901        [EMPLOYEE ID#] !
 S" Brian"    [EMPLOYEE NAME] PLACE
 S" Forth"    [EMPLOYEE FAMILY] PLACE
 S" 116 Settlement Park Ave." [EMPLOYEE ADDRESS] PLACE
 S" Markham"  [EMPLOYEE CITY] PLACE
 S" Ontario"  [EMPLOYEE PROV] PLACE
 S" Canada"   [EMPLOYEE COUNTRY] PLACE
 S" (201)"    [EMPLOYEE AREACODE] PLACE
 S" 555-1212" [EMPLOYEE PHONE#] PLACE


: WRITE$ ( addr len --) COUNT TYPE  ;

: .REC
PAGE
      ." == Simple Database =="
CR    ." ID# " [EMPLOYEE ID#] @ .
CR
CR   ." Last  Name: " [EMPLOYEE FAMILY] WRITE$
CR   ." First Name: " [EMPLOYEE NAME] WRITE$
CR
CR   ." Address   : " [EMPLOYEE ADDRESS] WRITE$
CR   ." City      : " [EMPLOYEE CITY] WRITE$
CR   ." Prov      : " [EMPLOYEE PROV] WRITE$
CR   ." Country   : " [EMPLOYEE COUNTRY] WRITE$
CR
CR   ." Phone#    : " [EMPLOYEE AREACODE] WRITE$ SPACE
                      [EMPLOYEE PHONE#] WRITE$
CR
;

 

 

  • Like 2

Share this post


Link to post
Share on other sites

Interesting of course. Thx I'll take a peek.. but I've got some user interface structure to take care of first and I'll at some point take a stab at this.

  • Like 1

Share this post


Link to post
Share on other sites
20 hours ago, GDMike said:

 

 

20 hours ago, GDMike said:

Hi Bill, nice to hear from you. Happy new year!

Yes, Know I should of started with Forth, BUT I actually knew more in assembly than Forth..so your response is, that's a better reason. Lol right. Well, I wanted it to be up and running before the new year and I almost made it. 

So here we are, in TF. BUT this is probably going to be long drawn out as it's more of a learning tour I think now. And I don't have anything against that for sure, as I'll benefit.

Thx for chiming in. 

And see Lee's response regarding F18As. Until Matt puts out ..MK2.. this works from Han in Germany.

 

 

 

Sorry, it's taken me so long to get back to you, but I just finished going through the F18A DIY thread first.  Very interesting stuff, so did you build yours yourself or did you purchase both?  in any case, I still think you should do your project in forth using the TI forth assembler (SAMS required) or just programming forth words with HEX code, so you can test immediately!   TF may be a problem also, as it resides in the two RAM banks; which I use in X4th99 for new Library development code.  I would recommend Lee's FBforth, as I checked it out last year, and it's really good, but nobody makes better use of 1MB SAMS than my X4th99 for 1K buffers and Libraries, as you can allocate from 8 x 1K buffers up to 8192!  Libraries are 4K up to all available SAMS memory!  I have tested block buffers up to 8192, but I have only tested the Library capacity up to available SAMS memory when 8192 1K buffers are allocated.  Libraries can only use forth words in Xforth99 SAMS paged core memory and the 8K of standard memory available in X4th99.  I can already see your jaw hit the floor!  How can I use SAMS in all these ways?  Right?  Well, that's my secret.

 

RetroBill (FDOS)

Edited by Bill R Sullivan
Removed duplication
  • Like 3

Share this post


Link to post
Share on other sites
2 minutes ago, atrax27407 said:

Where could one find a copy of X4th99?

X4th99 is not ready for release, as I have one more major utility to add, but it will take some time, as I can't get to it until after I release a minimal TI Basic Plus (TIB+), and I still have a few clean ups to do on it.

  • Like 3

Share this post


Link to post
Share on other sites
3 hours ago, atrax27407 said:

Where could one find a copy of X4th99?

My question too. Lol. 

Share this post


Link to post
Share on other sites
3 hours ago, Bill R Sullivan said:

 

Sorry, it's taken me so long to get back to you, but I just finished going through the F18A DIY thread first.  Very interesting stuff, so did you build yours yourself or did you purchase both?  in any case, I still think you should do your project in forth using the TI forth assembler (SAMS required) or just programming forth words with HEX code, so you can test immediately!   TF may be a problem also, as it resides in the two RAM banks; which I use in X4th99 for new Library development code.  I would recommend Lee's FBforth, as I checked it out last year, and it's really good, but nobody makes better use of 1MB SAMS than my X4th99 for 1K buffers and Libraries, as you can allocate from 8 x 1K buffers up to 8192!  Libraries are 4K up to all available SAMS memory!  I have tested block buffers up to 8192, but I have only tested the Library capacity up to available SAMS memory when 8192 1K buffers are allocated.  Libraries can only use forth words in Xforth99 SAMS paged core memory and the 8K of standard memory available in X4th99.  I can already see your jaw hit the floor!  How can I use SAMS in all these ways?  Right?  Well, that's my secret.

 

RetroBill (FDOS)

Yeah, I can't use what isn't available. 😂, But being a SA aside, I'll have to stick to TF because I've already started learning it and already don't have enough knowledge built up yet to qualify as knowing it, so this will be a trial by learning and learn by mistake sorta thing for a bit.

Nothing wrong with that for me since it's what I would like to learn anyway. 

 

Share this post


Link to post
Share on other sites

Ok.. the latest on Foxit..

(Code to follow if I can get it out of CL99).

I was able to boot up into my Essentials Disk first of all because I do some things there, like init SAMs, set sound etc...

 

Once that was done loading I then was able to branch out and FORGET a few things I don't need anymore in order to load up my Foxit work. A bunch of it is just boot up stuff, welcome screen etc.. then I load disk2 here...(Foxit lives here).

 

Here I set my character set so I can use inverted characters.

I created my command window.

I created 2 new WORDS, "SAVCOM" and "RESCOM"

These allow me to save the command box and it's state, or allow me to restore the command box and it's state.

I need this because I'll find myself entering commands and then I might have to look at the help screen, or I may want to get a directory, which isn't quite done yet, but anyhow, I need to be able to save and restore the command window. And I got it done. 

I'll offer out the code and someone can tell me how I'm doing along the way... code will follow... just wait for me..

 

Edited by GDMike

Share this post


Link to post
Share on other sites

Just a tip to save you some work: TF already has an inverse character set built in. Just add 96 to the ASCII code to get the inverse. ASCII characters 48 to 122 have equivalents starting at ASCII code 144. Try this:

: test ( -- )
  cr 123 48 do
    i emit  i 96 + emit  3 spaces 
  loop ;

:thumbsup:

  • Like 2

Share this post


Link to post
Share on other sites
30 minutes ago, GDMike said:

Cool beans. I'll use it.

Quick bit of code to display an inverted string:

: .INV$ ( c-addr len -- )
  OVER + SWAP DO I [email protected] DUP 48 123 WITHIN IF 96 + THEN EMIT LOOP ;
  
: TEST ( -- ) S" Hello mother! 12345..." .INV$ ; 

Note: Not all characters are inverted. For example, the space character (ASCII 32). You can get around that by replacing spaces with ASCII 0. Let us know if you want the code and one of us will post it :thumbsup:

 

Also, have a look at block 28 on the TOOLS disk. If you have the standard TF UTILS blocks disk in DSK1, and TOOLS in DSK2, you should be able to type TOOLS from the boot screen (assuming standard TF boot disk in DSK1) and type 28 LOAD. The code for it is below. It handles replacing spaces for you and is written in machine code so it's dead quick.

 

--BLOCK-00028---------
base @ hex
CODE: INVERT$
C054 C024 0002 04C2 D090 0282 8000 1A07 0282 DA00 1B03 0222
A000 D402 1009 0282 2000 1A06 0282 7A00 1B03 0222 6000 D402
0580 0601 16E9 ;CODE
base !
 
.( INVERT$ { addr len -- addr len } loaded.)
.( INVERT$ inverts a string.)
.( Eg: )
.( : TEST S" This is a test" INVERT$ TYPE ; )
: TESTi S" Test of INVERT$" 2DUP TYPE INVERT$ CR TYPE CR ;
TESTi

1685534371_Screenshotfrom2022-01-3022-49-03.png.0f225ab7e73973527a3d19f315866ceb.png

  • Like 1

Share this post


Link to post
Share on other sites

ASSEMBLY FLASHBACK, PaRtY tImE:

 

Though not to sure about your LOADING issues...

 

helpus.thumb.jpg.1e23af1c00b041db117df884f701cdcf.jpg

 

The 'HELPSO' file you're loading, doesn't look like it functions as intended.

 

helpus2.thumb.jpg.f597044f7e853bb2dd36edc0c4cdc184.jpg

 

After loading a few registers, you BLWP to @>0000, you probably intended a VMBR, or VMBW, did you REF, either or both?

  • Like 1

Share this post


Link to post
Share on other sites

Yes sir.. but not on that particular file as I thought about that after the fact lol .

But yes.

  • Haha 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...