|
Re: Newbie with Tiny68K [message #4311 is a reply to message #4310] |
Wed, 07 February 2018 10:01   |
smp
Messages: 49 Registered: January 2018 Location: Bedford, NH, USA
|
Member |
|
|
plasmo wrote on Tue, 06 February 2018 23:09 ... Since cpmtools is so useful, you should learn how to use it to transfer files in and out of cpm disk image. Here is how I would use cpmtools to extract files from diskc.cpm.fs image: ...
Hi Bill,
Thank you *very* much for the instructions. I agree that getting some experience using cpm tools will be quite beneficial. I noodled my way through it and I managed to get access to the disk image file, and then extract the two F83 files. I pulled the files into CP/M using GKermit, and I have the F83 running! I found that F83 requires several of the BLK files from before, so I extracted them (again) from the LBR file. I now have everything together on my disk B: and it all seems to be running. I have lots more experimenting to do with F83, for sure.
Thanks also to Roger and Rienk for your advice and assistance, too! You folks are all awesome, with all your advice and assistance. Being new to the 68K is interesting, as I can often get myself confused due to my past experience with 8080 & Z80 CP/M machines. I get thinking that I know what I'm doing and before I know it, I'm wandering in the weeds with these new tools that I haven't used before.
Thanks again, guys, I really appreciate you all.
smp
|
|
|
Re: Newbie with Tiny68K [message #4312 is a reply to message #4311] |
Wed, 07 February 2018 11:53   |
smp
Messages: 49 Registered: January 2018 Location: Bedford, NH, USA
|
Member |
|
|
I've been playing around with F83. I typed in my Forth version of my favorite test program, how many ways to make $1 from change:
VARIABLE P
VARIABLE N
VARIABLE D
VARIABLE Q
VARIABLE C
: DOLLAR
DECIMAL
CR 0 C !
101 0 DO
I P !
21 0 DO
I N !
11 0 DO
I D !
5 0 DO
I Q !
P @ N @ 5 * D @ 10 * Q @ 25 *
+ + + 100 =
IF
." P=" P @ . ." N=" N @ .
." D=" D @ . ." Q=" Q @ . CR
C @ 1 + C !
THEN
LOOP
LOOP
LOOP
5 +LOOP
CR C @ . ." WAYS TO MAKE $1.00"
CR ;
In order to get it to fit on one screen of 16 lines, I needed to use multiple commands per line, but I printed it out here as clearly as I can, for ease of reading.
When I run this program in F83, it takes about 5 seconds. You may recall that on my system at 16 MHz, the Tiny BASIC took about 1:04 and the CP/M BASIC took about 2:04. This puts F83 at about 12-13 times faster than the Tiny BASIC version (and ~25 times faster than the CP/M BASIC). If you don't need floating point arithmetic, F83 seems to be an excellent alternative programming language.
smp
[Updated on: Wed, 07 February 2018 11:58] Report message to a moderator
|
|
|
Re: Newbie with Tiny68K [message #4313 is a reply to message #4312] |
Wed, 07 February 2018 13:51   |
smp
Messages: 49 Registered: January 2018 Location: Bedford, NH, USA
|
Member |
|
|
Here is the Sieve of Eratosthenes for F83:
Scr # 2 B:SMP.BLK
0 \ Sieve of Eratosthenes 07FEB18smp
1 : prime? ( n -- ? ) here + c@ 0= ;
2 : composite! ( n -- ) here + 1 swap c! ;
3 : sieve ( n -- )
4 here over erase 2
5 begin
6 2dup dup * >
7 while
8 dup prime?
9 if
10 2dup dup * do i composite! dup +loop
11 then
12 1+
13 repeat
14 drop cr
15 ." Primes: " 2 do i prime? if i . then loop ;
The largest integer it will handle is 32100. Anything larger than that and funny things start to happen. I assume that the size of the stack that it builds gets large enough to interfere with something else in memory.
smp
[Updated on: Wed, 07 February 2018 13:55] Report message to a moderator
|
|
|
|
|
Re: Newbie with Tiny68K [message #4330 is a reply to message #4328] |
Sun, 11 February 2018 11:38   |
smp
Messages: 49 Registered: January 2018 Location: Bedford, NH, USA
|
Member |
|
|
Yes, F83 is doing 16 bit integer math. You're correct, 32767 is the maximum positive signed integer.
Since the SIEVE returns what appears to be a rational list for 30099, and starts to fail somewhere near but above that number, I figured that there may be some collision in memory where the list the the SIEVE builds grows to collide with something else.
Thanks for your thoughts.
smp
[Updated on: Sun, 11 February 2018 11:38] Report message to a moderator
|
|
|
Re: Newbie with Tiny68K [message #4331 is a reply to message #4330] |
Sun, 11 February 2018 16:00   |
UhClem
Messages: 19 Registered: November 2015
|
Junior Member |
|
|
F83 is a 16 bit Forth which limits its address space. There are a couple of ways to handle the addresses:
1) Use the feature of the 68000 where loading a 16 bit value into an address register triggers an automatic sign extension. This is fast but limits you to using the 32K at the bottom of the address space and 32K at the top. Assuming you have RAM at the top.
2) Load the 16 bit address into a data register and then do something to bypass the sign extension. In KERNEL68.BLK NEXT is defined as:
LABEL >NEXT
IP )+ D7 MOVE LONG 0 D7 BP DI) W LEA
WORD W )+ D7 MOVE LONG 0 D7 BP DI) JMP
Either way, F83 is limited to 64KB. You can use the rest of the address space in other ways but the F83 kernel and code don't know about it.
David Schultz
|
|
|
|
|