ENTERPRISE KLUB
2019. május 25., 1055 Budapest, Nyugati tér 9. 14-19 óráig
Részletek
Welcome, Guest. Please login or register.


Author Topic: EXDOS programming (Read 1498 times)

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 35.0.1916.114 Chrome 35.0.1916.114
    • View Profile
EXDOS programming
« on: 2014.June.04. 15:12:22 »
How can I find out what drives are available and get a directory listing, Zozo? Basically to do a file selector.

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13340
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
    • http://enterprise.iko.hu/
Re: EXDOS programming
« Reply #1 on: 2014.June.04. 15:59:43 »
FISH 20 function call, you got a 26bit number in DE+HL.
L bit 0 = A
L bit 1 = B
etc
If bit set then the drive exist.
Example:
Code: [Select]
PUSH AF
                LD A,20
                CALL FISH
                POP BC
                LD A,B
FILE222:        SRL D
                RR E
                RR H
                RR L
                DJNZ FILE222
                JR NC,FILE225
JR NC when the drive (inputed at the begin in A) not exist.

Anyway exist a file selector, called as FILE :-)

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 35.0.1916.114 Chrome 35.0.1916.114
    • View Profile
Re: EXDOS programming
« Reply #2 on: 2014.June.04. 21:21:54 »
Quote from: Zozosoft
FISH 20 function call, you got a 26bit number in DE+HL


What is FISH and where do I find it?!

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13340
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
    • http://enterprise.iko.hu/
Re: EXDOS programming
« Reply #3 on: 2014.June.04. 21:39:17 »
Quote from: Saint
What is FISH and where do I find it?!
It is the central core of the EXDOS: Filing System Handler

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 35.0.1916.114 Chrome 35.0.1916.114
    • View Profile
Re: EXDOS programming
« Reply #4 on: 2014.June.04. 22:09:12 »
Quote from: Zozosoft
It is the central core of the EXDOS: Filing System Handler
Ok, starting to make some sense now. Although the reference I found "get login vector" is function call 0Bh, not 20?

Also, the reference seems to state you don't call FISH directly but via EXOS. The functions I want are the find first, find next and get login vector. Are these available via EXOS, so should I page in EXDOS and call at +10h to make the appropriate FISH call?

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13340
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
    • http://enterprise.iko.hu/
Re: EXDOS programming
« Reply #5 on: 2014.June.04. 22:48:24 »
Quote from: Saint
Ok, starting to make some sense now. Although the reference I found "get login vector" is function call 0Bh, not 20?
I think you found the very early 0.0 documentation :oops: lot of things are different than the final versions.
Unfortunately the documentation of the final, released 1.x version never published and still are missing :roll: :cry: Anyone have it :?:

In Hungary we collected many informations about EXDOS programming: lot of debbuging, disassembling, some documentations, some documentation from the TVC version (VT-DOS).
There is a Hungarian page about it.
Try with google translate :oops:

But probably you need some programming examples...

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13340
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
    • http://enterprise.iko.hu/
Re: EXDOS programming
« Reply #6 on: 2014.June.05. 10:04:25 »
First thing about accessing directly EXDOS: ask where it is? :-)
For this function the EXDOS have a special EXOS command, named "EXDOS",0FDh
This is return the FISH RAM area address at DE, it is valid in System Segment (FFh) at Page 2.
In B returned the EXDOS version as BCD number for example 13h= version 1.3.
At the FISH RAM (IY-5EH) are the EXDOS ROM segment number. (This is the direct access of EXOS variable 64, named ROM_EXDOS)

When you want to direct access EXDOS, at the start store this important values:
Code: ZiLOG Z80 Assembler
  1.                                 LD DE,EXDFD
  2.                                 EXOS 26
  3.                                 JP NZ,NO_EXDOS_ERROR
  4.                                 LD (FISHIY),DE
  5.                                 LD A,B
  6.                                 LD (EXDVER),A
  7.                                 PUSH DE
  8.                                 POP IY
  9.                                 LD A,255
  10.                                 OUT (0B2h),A
  11.                                 LD A,(IY-5Eh)
  12.                                 LD (EXDROM),A
  13.  
  14.  
  15. EXDFD                   DB 6,"EXDOS",0FDH
  16.  

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13340
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 29.0 Firefox 29.0
    • View Profile
    • http://enterprise.iko.hu/
Re: EXDOS programming
« Reply #7 on: 2014.June.05. 10:45:36 »
Because the ROM routines are at different positions in every ROM version the EXDOS ROM started with jump table:
Code: ZiLOG Z80 Assembler
  1. C000h DB "EXOS_ROM"
  2. C008h DW 0
  3. C00Ah JP SYS_EXT
  4. C00Dh JP DISKIO
  5. C010h JP FISH

Then FISH can be accessed at C010h at every EXDOS version.

Example for FISH call, read Boot sector of Drive A:
Code: ZiLOG Z80 Assembler
  1.                                 IN A,(0B3h)
  2.                                 LD (SAVEP3),A ;save Page 3
  3.                                 IN A,(0B2h)
  4.                                 LD (SAVEP3),A ;save Page 2
  5.                                 LD A,(EXDROM)
  6.                                 OUT (0B3h),A ;Page EXDOS ROM to P3
  7.                                 LD A,255
  8.                                 OUT (0B2h),A ;Page System Segment to P2
  9.                                 LD IY,(FISHIY) ;FISH RAM area address
  10.                                 LD A,18 ;read sectors
  11.                                 LD H,1  ;number of sectors
  12.                                 LD DE,0 ;start sector
  13.                                 LD L,1  ;drive number
  14.                                 LD IX,3000h ;memory address for the readed data
  15.                                 CALL 0C010H     ;CALL FISH
  16.                                 PUSH AF ;save error code
  17.                                 LD A,(SAVEP3)
  18.                                 OUT (0B3h),A ;restore Page 3
  19.                                 LD A,(SAVEP2)
  20.                                 OUT (0B2h),A ;restore Page 2
  21.                                 POP AF ;get back error code
  22.                                 JP NZ,DISK_ERROR
  23.  
If you don't use Page 2,3 then can page the System Segment and EXDOS ROM at the start, then not need paging at each call.
If you use all pages then the best way put a FISH call routine to Page 0 which is do the EXDOS page in and out.

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
  • OS:
  • Mac OS X Mac OS X
  • Browser:
  • Safari 6.0 Safari 6.0
    • View Profile
Re: EXDOS programming
« Reply #8 on: 2014.June.06. 22:07:44 »
Excellent, thank you Zozo! :)