Post Reply 
(71B) FORTH questions
06-22-2023, 07:53 PM (This post was last modified: 06-22-2023 08:06 PM by Sylvain Cote.)
Post: #39
RE: (71B) FORTH questions
(06-22-2023 05:13 PM)floppy Wrote:  Sylvain: "Software Developer Handbook" page 41 says, upload FTHUTILA and FTHUTILF: where are they (as LIF file)?

Using files from SDH LIF volume as is (with the 1BBBB bug in it) in a Emu71 + Virtual-IL setup ...
  1. download the LIF volume file that Robert posted in one of the previous message → DEV-HB.DAT.txt
  2. rename the file to DEV-HB.DAT
  3. run ILPER
  4. configure ILPER to use TCP-IP instead of the PIL-Box
  5. configure ILPER to use the DEV-HB.DAT LIF volume
  6. start ILPER
  7. run EMU71
  8. configure EMU71 virtual IL module to use TCP-IP
  9. configure EMU71 to use the FORTH ROM image
  10. configure EMU71 to use a 128K RAM module
  11. start EMU71
  12. CAT :TAPE should give you the following listing:
    Code:
       NAME    S TYPE   LEN    DATE    TIME 
    STRINGLX     LEX     837 12/11/11 19:58 
    KBD150       BASIC  1088 12/11/11 19:58 
    PATTERN      LEX     171 12/11/11 19:59 
    GEDIT        BASIC  1085 12/11/11 19:59 
    KBD264       BASIC   932 12/11/11 19:59 
    CUSTUTIL     LEX    1007 12/11/11 20:00 
    FTHUTILA     TEXT   7424 12/11/11 20:00 
    BREAKPT      LEX     365 12/11/11 20:01 
    FTHUTILC     FORTH  4437 12/11/11 20:01 
    FTHUTILF     TEXT  11520 12/11/11 20:03
  13. PURGE FORTHRAM // optional: restart from scratch your FORTH environment
  14. FORTH
  15. " FTHUTILA:TAPE" ASSEMBLE
  16. " FTHUTILF:TAPE" LOADF
  17. TIME // get time and put value in X of the floating point stack
  18. F. // display floating point stack X which is the time in seconds
  19. BYE


Alternatively ...

my setup
  • lifutils installed on macOS/linux and in my path.
  • Using virtual machine provider (Parallels , VMware, etc) to run Windows 7 64-bit Pro
  • Virtual-IL & EMU71 is installed in Windows
  • Shared drive is activated and configured so I can stuff in macOS/Linux and use the output in Windows

Using the custom TIME patched file with in a Emu71 + Virtual-IL setup ...
  1. save the following code in an ascii text file named -> timeasm.txt
    Code:

           FORTH
    *                                TIMEASM
    *                        FORTH TIME: Primitive

    SAVEFP EQU #E717A           FORTH entry points:  Save FORTH pointers
    GETFP  EQU #E71A5                                Recover FORTH pointers
    STKLFT EQU #E7320                                Lift floating-point stack
    CMPT   EQU #125B2          System entry points:  Read time
    IDIV   EQU #0EC7B                                Full word integer divide
    HXDCW  EQU #0ECB4                                Hex to decimal
    FLOAT  EQU #1B322                                Integer to floating point
    CLRFRC EQU #0C6F4                                Clear fractional part
    DV2-12 EQU #0C4A8                                12-digit divide

    * TIME : Read system clock in seconds; return result to X
           WORD 'TIME'
           GOSBVL SAVEFP
           GOSBVL STKLFT
           P=     5              *** workaround for bug 1084
           GOSBVL CMPT           C(W) = Time in hex 512ths of a second
    *
    ACLC24 A=C W                 Unsupported entry point. 12B79
           C=0 W
           P= 4
           LCHEX 2A3             C = 2A30000
           D=C W                 D = 2A30000 ( 24 hours in 512th's of a second )
    *
           GOSBVL IDIV
           GOSBVL HXDCW
           A=C W
           GOSBVL FLOAT
           C=0 W
           P= 12
           LCHEX 512             C = 5.12
           GOSBVL DV2-12         A,B = Time*100
           GOSBVL CLRFRC         A,B = IP(Time*100)
           GOSUB TRUNCC
           C=C-1 X
           C=C-1 X               C = TIME
           SETHEX
           D0=(5) #2FBD0         X-Register
           DAT0=C W              X = TIME
           GOSBVL GETFP
           RTNCC

    TRUNCC P= 0                  unsupported system utility at 12B4A
           LCHEX 00499           rounds 15-digit A,B to 12-digit C
           ?A<=C A
           GOYES TRUN20
           C=-C A
           ?A>=C A
           GOYES TRUN20
           C=0 W
           A=A+A A
           GOC TRUN10
           LCHEX F00
           C=A S
    TRUN10 RTNCC
    TRUN20 C=A W
           C=B M
           RTNCC

           END
    From the command line on macOS/Linux and in a folder that is shared with Windows:
  2. lifinit -z -m cass v71time.dat 64
  3. liflabel v71time.dat TAPE01
  4. cat timeasm.txt | textlif TIMEASM | lifput v71time.dat
  5. lifdir v71time.dat // should give you the following listing:
    Code:

    Volume : TAPE01 , formatted : 22/06/23 15:00:00
    Tracks: 2 Surfaces: 1 Blocks/Track: 256 Total size: 512 Blocks, 131072 Bytes
    TIMEASM     TEXT         2048/2048     22/06/23 15:35:45
    1 files (64 max), last block used: 17 of 512
    On Windows
  6. run ILPER
  7. configure ILPER to use TCP-IP instead of the PIL-Box
  8. configure ILPER to use the v71time.dat LIF volume from the shared drive
  9. start ILPER
  10. run EMU71
  11. configure EMU71 virtual IL module to use TCP-IP
  12. configure EMU71 to use the FORTH ROM image
  13. configure EMU71 to use a 128K RAM module
  14. start EMU71
  15. CAT :TAPE should give you the following listing:
    Code:
       NAME    S TYPE   LEN    DATE    TIME 
    TIMEASM      TEXT   1792 06/22/23 15:07
  16. PURGE FORTHRAM // optional: restart from scratch your FORTH environment
  17. FORTH
  18. " TIMEASM:TAPE" ASSEMBLE
  19. TIME // get time and put value in X of the floating point stack
  20. F. // display floating point stack X which is the time in seconds
  21. BYE


edit 1: typo
edir 2: added environment info
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(71B) FORTH questions - floppy - 05-29-2023, 04:13 PM
RE: (71B) FORTH questions - rprosperi - 05-29-2023, 04:52 PM
RE: (71B) FORTH questions - floppy - 05-29-2023, 07:58 PM
RE: (71B) FORTH questions - rprosperi - 05-30-2023, 12:29 AM
RE: (71B) FORTH questions - floppy - 05-30-2023, 02:07 PM
RE: (71B) FORTH questions - floppy - 05-30-2023, 04:05 PM
RE: (71B) FORTH questions - floppy - 05-30-2023, 04:39 PM
RE: (71B) FORTH questions - rprosperi - 05-30-2023, 07:42 PM
RE: (71B) FORTH questions - floppy - 05-31-2023, 06:50 AM
RE: (71B) FORTH questions - rprosperi - 05-31-2023, 12:18 PM
RE: (71B) FORTH questions - J-F Garnier - 05-31-2023, 01:00 PM
RE: (71B) FORTH questions - rprosperi - 05-31-2023, 10:26 PM
RE: (71B) FORTH questions - floppy - 05-31-2023, 12:42 PM
RE: (71B) FORTH questions - floppy - 05-31-2023, 02:25 PM
RE: (71B) FORTH questions - J-F Garnier - 05-31-2023, 04:00 PM
RE: (71B) FORTH questions - floppy - 05-31-2023, 07:55 PM
RE: (71B) FORTH questions - floppy - 06-15-2023, 07:34 PM
RE: (71B) FORTH questions - rprosperi - 06-16-2023, 03:22 AM
RE: (71B) FORTH questions - floppy - 06-16-2023, 01:53 PM
RE: (71B) FORTH questions - J-F Garnier - 06-16-2023, 04:01 PM
RE: (71B) FORTH questions - rprosperi - 06-17-2023, 01:52 AM
RE: (71B) FORTH questions - J-F Garnier - 06-16-2023, 02:20 PM
RE: (71B) FORTH questions - floppy - 06-16-2023, 05:27 PM
RE: (71B) FORTH questions - J-F Garnier - 06-16-2023, 08:12 PM
RE: (71B) FORTH questions - floppy - 06-19-2023, 08:09 PM
RE: (71B) FORTH questions - Sylvain Cote - 06-19-2023, 09:16 PM
RE: (71B) FORTH questions - David Hayden - 07-25-2023, 06:05 PM
RE: (71B) FORTH questions - J-F Garnier - 07-25-2023, 06:38 PM
RE: (71B) FORTH questions - mfleming - 06-19-2023, 09:08 PM
RE: (71B) FORTH questions - floppy - 06-20-2023, 10:31 AM
RE: (71B) FORTH questions - rprosperi - 06-20-2023, 02:15 AM
RE: (71B) FORTH questions - KimH - 06-20-2023, 07:41 PM
RE: (71B) FORTH questions - rprosperi - 06-20-2023, 09:30 PM
RE: (71B) FORTH questions - Sylvain Cote - 06-21-2023, 12:03 AM
RE: (71B) FORTH questions - J-F Garnier - 06-21-2023, 07:00 AM
RE: (71B) FORTH questions - floppy - 06-22-2023, 05:13 PM
RE: (71B) FORTH questions - rprosperi - 06-22-2023, 06:51 PM
RE: (71B) FORTH questions - floppy - 10-19-2023, 05:01 PM
RE: (71B) FORTH questions - Sylvain Cote - 06-22-2023 07:53 PM
RE: (71B) FORTH questions - floppy - 07-31-2023, 03:41 PM
RE: (71B) FORTH questions - Sylvain Cote - 07-31-2023, 07:21 PM
RE: (71B) FORTH questions - floppy - 07-25-2023, 02:36 PM
RE: (71B) FORTH questions - Sylvain Cote - 07-25-2023, 03:02 PM
RE: (71B) FORTH questions - floppy - 07-25-2023, 03:52 PM
RE: (71B) FORTH questions - floppy - 07-26-2023, 05:02 PM
RE: (71B) FORTH questions - rprosperi - 07-26-2023, 08:17 PM
RE: (71B) FORTH questions - floppy - 07-27-2023, 08:05 AM
RE: (71B) FORTH questions - Garth Wilson - 07-27-2023, 11:20 PM
RE: (71B) FORTH questions - floppy - 08-01-2023, 10:10 AM
RE: (71B) FORTH questions - HP67 - 08-01-2023, 10:12 AM
RE: (71B) FORTH questions - floppy - 08-01-2023, 11:11 AM
RE: (71B) FORTH questions - rprosperi - 08-01-2023, 12:29 PM
RE: (71B) FORTH questions - Sylvain Cote - 08-01-2023, 12:44 PM
RE: (71B) FORTH questions - floppy - 08-01-2023, 01:03 PM
RE: (71B) FORTH questions - Sylvain Cote - 08-01-2023, 01:25 PM
RE: (71B) FORTH questions - floppy - 08-01-2023, 02:33 PM
RE: (71B) FORTH questions - Sylvain Cote - 08-01-2023, 03:14 PM
RE: (71B) FORTH questions - floppy - 08-01-2023, 03:46 PM
RE: (71B) FORTH questions - rprosperi - 08-01-2023, 04:53 PM
RE: (71B) FORTH questions - Sylvain Cote - 08-01-2023, 04:55 PM
RE: (71B) FORTH questions - rprosperi - 08-01-2023, 06:29 PM
RE: (71B) FORTH questions - Sylvain Cote - 08-01-2023, 06:48 PM
RE: (71B) FORTH questions - floppy - 09-08-2023, 04:18 PM
RE: (71B) FORTH questions - Sylvain Cote - 09-08-2023, 05:39 PM
RE: (71B) FORTH questions - floppy - 09-12-2023, 01:33 PM
RE: (71B) FORTH questions - Sylvain Cote - 09-12-2023, 06:39 PM
RE: (71B) FORTH questions - KeithB - 09-12-2023, 06:26 PM
RE: (71B) FORTH questions - floppy - 09-21-2023, 10:21 AM
RE: (71B) FORTH questions - rprosperi - 09-21-2023, 02:53 PM
RE: (71B) FORTH questions - floppy - 09-22-2023, 09:33 AM
RE: (71B) FORTH questions - rprosperi - 09-22-2023, 12:00 PM
RE: (71B) FORTH questions - floppy - 10-01-2023, 11:21 AM
RE: (71B) FORTH questions - rprosperi - 10-01-2023, 11:49 AM
RE: (71B) FORTH questions - floppy - 10-01-2023, 12:25 PM
RE: (71B) FORTH questions - rprosperi - 10-01-2023, 02:41 PM
RE: (71B) FORTH questions - floppy - 10-17-2023, 09:21 AM
RE: (71B) FORTH questions - floppy - 10-17-2023, 11:28 AM
RE: (71B) FORTH questions - floppy - 10-17-2023, 11:38 AM
RE: (71B) FORTH questions - rprosperi - 10-20-2023, 02:11 AM
RE: (71B) FORTH questions - floppy - 10-20-2023, 07:45 AM
RE: (71B) FORTH questions - Sylvain Cote - 10-20-2023, 11:56 AM
RE: (71B) FORTH questions - rprosperi - 10-20-2023, 12:32 PM
RE: (71B) FORTH questions - Sylvain Cote - 10-20-2023, 03:46 PM



User(s) browsing this thread: 1 Guest(s)