Enterprise Forever

:UK => Other topics => Topic started by: SlashNet on 2021.March.19. 17:25:05

Title: Autorun at Enterprise
Post by: SlashNet on 2021.March.19. 17:25:05
I know EXDOS reads EXDOS.INI at start, but I can't find how to load BAS-file from this file.
Is it possibile to autostart basic files?

At now I see variant to run IS-BASIC and then press F1 (I have START file with ASCII-basic inside).


Title: Re: Autorun at Enterprise
Post by: szipucsu on 2021.March.19. 19:02:32
I think EXDOS.INI cannot load basic programs. I also missed that. But there should be another way. Maybe hacking the basic rom.
Or, EXDOS.INI runs a machine code program that loads a basic program... is it possible?
Title: Re: Autorun at Enterprise
Post by: dangerman on 2021.March.19. 22:40:45
This is a very good question. It would be great if there was some way to start BASIC programs from EXDOS. I expect it will require some trickery though.
Title: Re: Autorun at Enterprise
Post by: gflorez on 2021.March.19. 22:59:26
There is a way (https://enterpriseforever.com/programming/basic-as-a-script-language/msg58701/#msg58701).
Title: Re: Autorun at Enterprise
Post by: SlashNet on 2021.March.20. 00:07:38
There is a way (https://enterpriseforever.com/programming/basic-as-a-script-language/msg58701/#msg58701).

Thanks! It worked!
Title: Re: Autorun at Enterprise
Post by: gflorez on 2021.March.20. 23:39:06
A better option, I think, would be to use the Basic launcher source code we had, to make a simple command.

I mean, to use the functionality on EPs where there is not possible to install the EPDOS Rom.

Code: [Select]
BASROM:         LD IX,(0BF9CH)          ;CY=1 HA MEGVAN + A'=BASIC ROM
BASROM10:       LD DE,-4
                ADD IX,DE
                LD A,(IX)
                OR A
                RET Z
                OUT (0B1H),A
                EX AF,AF'
                LD BC,6
                LD DE,7AB5H
                LD HL,_BASIC
BASROM20:       LD A,(DE)
                INC DE
                CPI
                JR NZ,BASROM10
BASROM30:       JP PE,BASROM20
                SCF
                RET
_BASLOAD:       PUSH DE
                CALL BASROM
                LD A,40H
                LD C,0
                POP DE
                RET NC
                DI
                PUSH DE
                LD HL,200H
                PUSH HL
                POP IX
                LD DE,201H
                LD BC,47H
                LD (HL),0
                LDIR
                POP HL
                LD C,(HL)
                LDIR
                LD H,D
                LD L,E
                DEC HL
                LD (HL),0
                LD BC,1000H
                LDIR
                LD C,60H
                EXOS 0
                LD SP,0DBBH
                LD DE,0BEB8H+6
                CALL _STRWR
                DB "I"+128,"S"+128,"-"+128,"B"+128
                DB "A"+128,"S"+128,"I"+128,"C"+128
                DB "     program   0",0
                LD HL,1054
                LD (246H),HL
                LD HL,0101H
                LD (20FH),HL
                LD A,H
                LD (200H),A
                LD L,4
                LD (0BFF8H),HL
                LD DE,446H
                PUSH DE
                LD HL,BASRUN40
                LD BC,BASRUN50-BASRUN40
                LDIR
                EX AF,AF'
                RET
BASRUN40:       OUT (0B3H),A
                CALL 0C0C6H
                CALL 0ED63H
                LD (IX+0CH),L
                ADD HL,HL
                LD DE,0E54H
                ADD HL,DE
                CALL 0F579H
                LD (21CH),HL
                LD (21EH),HL
                LD (220H),HL
                LD DE,0FA0AH
                EXOS 26
                CALL 0ED90H
                CALL 0CCC7H
                RST 010H
                DB 092H,7,096H,019H,0EH,0
                CALL 0F1D8H
                CALL 0D85BH
                CALL 0C0C6H
                CALL 0C3D1H
                CALL 0C3DBH
                JP 0C37CH
BASRUN50:
Title: Re: Autorun at Enterprise
Post by: elmer on 2021.March.21. 16:54:37
There is a way (https://enterpriseforever.com/programming/basic-as-a-script-language/msg58701/#msg58701).

That is a really cool hack of the BASIC ROM! :ds_icon_cheesygrin:

I agree with you, it would be nice to have that available without EPDOS, for those people that don't have EPDOS in ROM.

It looks like there is some free space in the EXOS 2.4 ROM, it would be great to put a few of the useful EPDOS commands in that memory space, especially a version of "LROM" so that people with lots of RAM could load up EPDOS (or any other ROM) from EXDOS.INI.
Title: Re: Autorun at Enterprise
Post by: gflorez on 2021.March.21. 20:09:03
Yes, but the EPDOS as extension (http://www.ep128.hu/Ep_Util/Prg/Epdos17.rar) also installs Roms the same, so an user with lots of Ram can still manage Roms.

(This is version 1.7, only legacy drives, A,B,C,D and E)

EPDOS has other valuable utilities for a developer, because it has powerful commands to peek on the inners of the operative system, for example returning lists of Ram/Rom segments, channels and devices.

[attachimg=1]
Title: Re: Autorun at Enterprise
Post by: dangerman on 2021.March.22. 21:24:14
There is a way (https://enterpriseforever.com/programming/basic-as-a-script-language/msg58701/#msg58701).

Excellent!

And thanks for the code also! ;-)

Title: Re: Autorun at Enterprise
Post by: Zozosoft on 2021.March.22. 22:43:41
The best way will be if the IS-BASIC ROM can handle the Load Module action...
Bruce? :ds_icon_cheesygrin:
Title: Re: Autorun at Enterprise
Post by: gflorez on 2021.March.23. 10:12:14
Yes, it would be great to execute :BASIC PROGRAM.BAS  .


Edit: And on a Tape based EP? it would put the relay on and search for the file.... marvellous.