Jump to content
Sign in to follow this  
Kchula-Rrit

What DSR File/device names are used for I/O?

Recommended Posts

Is there a convention for specifying files or devices in a TI system?  Since getting Level 2 I/O to work, I am now trying to move on to getting file or device status.  This is so I can determine if a file actually exists before trying to open it for reading, or to guard against over-writing an existing file.  I was also thinking I can get the file-access types (DV80, etc.) to open files properly.  This could replace some clunky code in a couple of programs I've been working on.

 

I can get the file-name by looking for the last occurrence of a dot in the name string.  The file-name is the next character beyond the dot, and the disk number is the character right before the dot.

 

The TI disk controller manual says that a disk can be referred-to by name, such as "DSK.SOURCE.THIS;C".  The DSR would find the disk named "SOURCE" and use it.  I assume the Level-2 subprograms do not work with this method, since there is not necessarily a digit in the disk name.

 

Since I'm using a NanoPEB and I have a real PEB as well, I could just take the fourth character and never use disk names.  Unfortunately, that would not work for polling a Myarc HFDC or RS232 port.

 

Also, what if I pass a file-name such as "SIO.BA=9600", to send data to a printer or logging device?  If I try to use the >14 subprogram to read the status, it should bomb because "BA=9600" is not a valid name.  Also, "SIO" has no digit in it.  Or, is >14 just limited to examining disk drives?

 

Thanks,

 

K-R.

 

  • Like 1

Share this post


Link to post
Share on other sites

The level 2 subprograms are disk-specific, only the PAB methods are global to all devices. 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
6 hours ago, Kchula-Rrit said:

Is there a convention for specifying files or devices in a TI system?  Since getting Level 2 I/O to work, I am now trying to move on to getting file or device status.  This is so I can determine if a file actually exists before trying to open it for reading, or to guard against over-writing an existing file.  I was also thinking I can get the file-access types (DV80, etc.) to open files properly.  This could replace some clunky code in a couple of programs I've been working on.

 

The DSR “Status” routine (op-code = 9) can be used to get that information, whether or not the file is open (see page 297, Editor/Assembler Manual). It puts status information in status byte 8 of a file’s PAB. the Editor/Assembler Manual terms this byte the “screen offset” and erroneously states that it “is used only by the cassette interface”—it, obviously, is used by the “Status” DSR, as well.

 

...lee

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Just so you know here is the Editor Assembler Error routing and those errors:

[1553]               ***********************************************************
[1554]               * ERRORS 
[1555]               *
[1556] F32E 06,E8,1F GE8A8  CALL  EASCRN
[1557] F331 06,F4,CA        CALL  WENTER
[1558] F334 40,86           BR    GE029
[1559] F336 06,E8,1F GE8B0  CALL  EASCRN
[1560] F339 06,F3,88 GE8B3  CALL  GE8FC
[1561] F33C CA,22,08        CHE   >08,@CODE
[1562] F33F 53,E4           BR    CHKERR
[1563] F341 A6,22,08        SUB   >08,@CODE
[1564] F344 C6,22,05        CH    >05,@CODE

99/4 GPL-ASSEMBLER (Pass 3) correct                                   PAGE 0036 
Rich E/A GROM
[1565] F347 73,5A           BS    GE8D4
[1566] F349 06,F4,37        CALL  CLSALL
[1567] F34C 8A,22           CASE  @CODE
[1568] F34E 53,96           BR    GE90F
[1569] F350 53,8F           BR    GE908
[1570] F352 53,AF           BR    GE928
[1571] F354 53,B6           BR    GE92F
[1572] F356 53,BD           BR    GE936
[1573] F358 53,C4           BR    GE93D
[1574] F35A DA,48,20 GE8D4  CLOG  >20,@FLAG
[1575] F35D 49,CA           BR    GE767
[1576] F35F DA,49,01        CLOG  >01,@FLAG2
[1577] F362 4A,14           BR    LANDR
[1578] F364 06,F4,53        CALL  CLSPAB
[1579] F367 43,8D           BR    EDITOR
[1580] F369 06,F3,88 GE8E3  CALL  GE8FC
[1581] F36C 06,E8,1F        CALL  EASCRN
[1582] F36F D6,22,0F        CEQ   >0F,@CODE
[1583] F372 53,7B           BR    GE8F5
[1584] F374 06,F4,73        CALL  ERRMSG
[1585] F377 F7,44           DATA  ERRPNF  * ERROR PROGRAM NOT FOUND
[1586] F379 53,D0           BR    GE949
[1587] F37B 06,F4,73 GE8F5  CALL  ERRMSG
[1588] F37E F6,DA           DATA  ERRC
[1589] F380 40,86           BR    GE029
[1590] F382 06,F3,88        CALL  GE8FC
[1591] F385 05,E0,86        B     GE029
[1592] F388 39,00,01 GE8FC  MOVE  1,[email protected],#1
       F38B 01,F7,94
[1593] F38E 00       GE907  RTN
[1594] F38F 06,F4,67 GE908  CALL  WRNMSG
[1595] F392 F6,E5           DATA  CCRMSG  * WARNING CONTROL CHARACTERS REMOVED
[1596] F394 53,5A           BR    GE8D4
[1597] F396 06,F4,73 GE90F  CALL  ERRMSG
[1598] F399 F6,9D           DATA  ERRMF   * ERROR MEMORY FULL
[1599] F39B 53,5A           BR    GE8D4
[1600] F39D 06,F4,73 GE916  CALL  ERRMSG
[1601] F3A0 F7,44           DATA  ERRPNF  * ERROR PROGRAM NOT FOUND
[1602] F3A2 40,6F           BR    OLDEA
[1603] F3A4 DA,48,08 GE91D  CLOG  >08,@FLAG
[1604] F3A7 53,A9           BR    GE9E2
[1605] F3A9 06,F4,73 GE9E2  CALL  ERRMSG
[1606] F3AC F6,B8           DATA  ERRNME  * ERROR NO MEMORY EXPANSION
[1607] F3AE 0B              EXIT
[1608] F3AF 06,F4,73 GE928  CALL  ERRMSG
[1609] F3B2 F6,FF           DATA  ERRIT   * ERROR ILLEGAL TAG
[1610] F3B4 4A,14           BR    LANDR
[1611] F3B6 06,F4,73 GE92F  CALL  ERRMSG
[1612] F3B9 F7,0B           DATA  ERRCE   * CHECKSUM ERROR
[1613] F3BB 4A,14           BR    LANDR
[1614] F3BD 06,F4,73 GE936  CALL  ERRMSG
[1615] F3C0 F7,1A           DATA  ERRDD   * ERROR DUPLICATE DEFINITION
[1616] F3C2 4A,14           BR    LANDR
[1617] F3C4 06,F4,73 GE93D  CALL  ERRMSG
[1618] F3C7 F7,2F           DATA  ERRUR   * ERROR UNRESOLVED REFERENCE
[1619] F3C9 4A,14           BR    LANDR
[1620] F3CB 06,F4,73 GE944  CALL  ERRMSG
[1621] F3CE F6,CC           DATA  ERRNTL  * ERROR NAME TO LONG
[1622] F3D0 8F,50    GE949  DCZ   @FAC6
[1623] F3D2 73,DF           BS    GE958
[1624] F3D4 BE,B0,4E        ST    SPACE,V*FAC4
       F3D7 20
[1625] F3D8 34,50,E0        MOVE  @FAC6,V*FAC4,[email protected](@FAC4)
       F3DB 01,4E,B0

99/4 GPL-ASSEMBLER (Pass 3) correct                                   PAGE 0037 
Rich E/A GROM
       F3DE 4E
[1626] F3DF 06,F4,DC GE958  CALL  CLRMSG
[1627] F3E2 4A,8B           BR    GE848
[1628] F3E4 8E,44    CHKERR CZ    @>8344           * Check Search flag
[1629] F3E6 73,EF           BS    CHKER2           * Yes, normal error
[1630] F3E8 90,44           INC   @>8344           * Drive # + 1
[1631] F3EA CA,44,3A        CHE   58,@>8344        * Last drive?
[1632] F3ED 4C,59           BR    MYSRCH           * No, continue Search
[1633] F3EF BC,4E,E0 CHKER2 ST    [email protected](@PABPTR),@FAC4
       F3F2 01,1C
[1634] F3F4 B2,4E,E0        AND   >E0,@FAC4
[1635] F3F7 E6,4E,05        SRL   >05,@FAC4
[1636] F3FA B6,4E,30        OR    >30,@FAC4
[1637] F3FD B2,E0,01        AND   >1F,[email protected](@PABPTR)
       F400 1C,1F
[1638] F402 D6,4E,35        CEQ   >35,@FAC4        Error Read past EOF
[1639] F405 54,14           BR    GE97A
[1640] F407 06,F4,37        CALL  CLSALL
[1641] F40A D6,47,01        CEQ   1,@LDFLAG
[1642] F40D 43,8D           BR    EDITOR           EDITOR
[1643] F40F D6,47,02        CEQ   2,@LDFLAG
[1644] F412 48,54           BR    ASSEM            ASSEMBLER
[1645] F414 06,F4,73 GE97A  CALL  ERRMSG
[1646] F417 F6,A9           DATA  ERRIOC         * I O ERROR CODE
[1647] F419 D6,47,01        CEQ   1,@LDFLAG
[1648] F41C 63,8D           BS    EDITOR
[1649] F41E D6,47,02        CEQ   2,@LDFLAG
[1650] F421 68,54           BS    ASSEM
[1651] F423 06,F4,37 GE97F  CALL  CLSALL
[1652] F426 DA,48,20        CLOG  >20,@FLAG
[1653] F429 40,6F           BR    OLDEA
[1654] F42B DA,49,01        CLOG  >01,@FLAG2
[1655] F42E 4A,14           BR    LANDR
[1656] F430 DA,49,08        CLOG  >08,@FLAG2
[1657] F433 40,6F           BR    OLDEA
[1658] F435 43,8D           BR    EDITOR
[1659] F437 06,F5,2B CLSALL CALL  P1000
[1660] F43A 06,F4,53        CALL  CLSPAB
[1661] F43D BF,1C,11        DST   >1100,@PABPTR
       F440 00
[1662] F441 06,F4,53        CALL  CLSPAB
[1663] F444 BF,1C,12        DST   >1200,@PABPTR
       F447 00
[1664] F448 06,F4,53        CALL  CLSPAB
[1665] F44B BF,1C,13        DST   >1300,@PABPTR
       F44E 00
[1666] F44F 06,F4,53        CALL  CLSPAB
[1667] F452 00              RTN
[1668] F453 BD,56,1C CLSPAB DST   @PABPTR,@VPAB
[1669] F456 A3,56,00        DADD  >0009,@VPAB
       F459 09
[1670] F45A BE,B0,1C        ST    >01,V*PABPTR
       F45D 01
[1671] F45E 06,00,10        CALL  DSRLNK
[1672] F461 08              BYTE  >08
[1673] F462 86,E0,09        CLR   [email protected]>0009(@PABPTR)
       F465 1C
[1674] F466 00              RTN
[1675] F467 06,F4,DC WRNMSG CALL  CLRMSG
[1676] F46A 31,00,0B        MOVE  11,[email protected],[email protected]>02A2
       F46D A2,A2,F6
       F470 92
[1677] F471 54,7D           BR    GE9DA
[1678] F473 06,F4,DC ERRMSG CALL  CLRMSG

99/4 GPL-ASSEMBLER (Pass 3) correct                                   PAGE 0038 
Rich E/A GROM
[1679] F476 31,00,09        MOVE  9,[email protected],[email protected]>02A2
       F479 A2,A2,F6
       F47C 60
[1680] F47D 88,4A    GE9DA  FETCH @FAC
[1681] F47F 88,4B           FETCH @FAC1
[1682] F481 86,4C           CLR   @FAC2
[1683] F483 33,00,01        MOVE  1,[email protected](@FAC),@FAC3
       F486 4D,00,00
       F489 4A
[1684] F48A 32,4C,A2        MOVE  @FAC2,[email protected](@FAC),[email protected]>02C2
       F48D C2,00,01
       F490 4A
[1685] F491 D7,4A,F6        DCEQ  ERRIOC,@FAC
       F494 A9
[1686] F495 54,9B           BR    GE9F8
[1687] F497 BC,A2,D2        ST    @FAC4,[email protected]>02D2
       F49A 4E
[1688] F49B D7,4A,F6 GE9F8  DCEQ  ERRC,@FAC
       F49E DA
[1689] F49F 54,CA           BR    WENTER
[1690] F4A1 E7,22,00        DSRL  >0004,@CODE
       F4A4 04
[1691] F4A5 E6,23,04        SRL   >04,@>8323
[1692] F4A8 C6,22,09        CH    >09,@CODE
[1693] F4AB 54,B5           BR    GEA12
[1694] F4AD C6,22,0F        CH    >0F,@CODE
[1695] F4B0 74,CA           BS    WENTER
[1696] F4B2 A2,22,07        ADD   >07,@CODE
[1697] F4B5 C6,23,09 GEA12  CH    >09,@>8323
[1698] F4B8 54,C2           BR    GEA1F
[1699] F4BA C6,23,0F        CH    >0F,@>8323
[1700] F4BD 74,CA           BS    WENTER
[1701] F4BF A2,23,07        ADD   >07,@>8323
[1702] F4C2 A3,22,30 GEA1F  DADD  >3030,@CODE
       F4C5 30
[1703] F4C6 BD,A2,D0        DST   @CODE,[email protected]>02D0
       F4C9 22
[1704]               *  Wait for ENTER
[1705] F4CA 31,00,17 WENTER MOVE  23,[email protected],[email protected]>02E2
       F4CD A2,E2,F6
       F4D0 7B
[1706] F4D1 03       GEA2E  SCAN
[1707] F4D2 54,D1           BR    GEA2E
[1708] F4D4 D6,75,0D        CEQ   >0D,@KEY
[1709] F4D7 54,D1           BR    GEA2E
[1710] F4D9 05,E0,25        B     SETUP  CHANGED FROM RETURN
[1711]               ***************************************

 

  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, Tursi said:

The level 2 subprograms are disk-specific, only the PAB methods are global to all devices. 

In retrospect, I want to tell me DUH!! It's on Thierry Nouspikel's DISK page!  I think of these things too late.

3 hours ago, Lee Stewart said:

 

The DSR “Status” routine (op-code = 9) can be used to get that information, whether or not the file is open (see page 297, Editor/Assembler Manual). It puts status information in status byte 8 of a file’s PAB. the Editor/Assembler Manual terms this byte the “screen offset” and erroneously states that it “is used only by the cassette interface”—it, obviously, is used by the “Status” DSR, as well.

 

...lee

I found out that the STATUS routine does not set one of the bits.  That came up in an earlier posting, where some kind gentleman confirmed my findings.  I am using Level 2 >14 to make up for it.  I figured it would also give me the record-length, which could be useful in the future.

 

K-R.

  • Like 1

Share this post


Link to post
Share on other sites

I assumed it was a Error bit not working correctly.

I only posted the EA error code routine but not the values they trigger. 

[email protected]>02C2 * is a error code flag that is checked.
[email protected]>02D0 * is a error code flag that is checked.

 

[email protected]>02E2 * is a error code flag that is checked.

>8322 is CODE area that stored a code to be checked for.

Share this post


Link to post
Share on other sites

Do we have a compiled list somewhere of valid device/filenames as used on the TI-99/4a ?

I like to check if a text string qualifies as a device/filename.

 

Here's what I can think of (and I'm for sure missing a lot of storage devices)

  • DSK*
  • TIPI.*
  • PIO.*
  • IDE*
  • RS232.*
  • HDX.*

Share this post


Link to post
Share on other sites
7 minutes ago, retroclouds said:

Do we have a compiled list somewhere of valid device/filenames as used on the TI-99/4a ?

I like to check if a text string qualifies as a device/filename.

 

Here's what I can think of (and I'm for sure missing a lot of storage devices)

  • DSK*
  • TIPI.*
  • PIO.*
  • IDE*
  • RS232.*
  • HDX.*

SCS

WDS

RD

CS1

CS2

Off top of my head.

 

 

  • Like 2

Share this post


Link to post
Share on other sites
2 hours ago, retroclouds said:

Do we have a compiled list somewhere of valid device/filenames as used on the TI-99/4a ?  I like to check if a text string qualifies as a device/filename.

 

Here's what I can think of (and I'm for sure missing a lot of storage devices)

  • DSK*
  • TIPI.*
  • PIO.*
  • IDE*
  • RS232.*
  • HDX.*

 

TI Disk Controller DSR:

  • DSK
  • DSK1
  • DSK2
  • DSK3

TI RS232 Card DSR:

  • RS232
  • RS232/1
  • RS232/2
  • RS232/3
  • RS232/4
  • PIO
  • PIO/1
  • PIO/2

...lee

  • Like 2

Share this post


Link to post
Share on other sites
2 hours ago, retroclouds said:

Do we have a compiled list somewhere of valid device/filenames as used on the TI-99/4a ?

I like to check if a text string qualifies as a device/filename

Valid device names are not set in stone since a new peripheral or an updated DSR can mean additional, valid names.  Is there a specific reason you do not want to (or cannot) rely upon the DSR to validate the device name?   Even if you have a full list of 'valid' device names, the only names that will work are those corresponding to an installed peripheral.  Checking name validity can be redundant except in some cases, such as working with the level 2 opcodes that require you to discern which card/CRU to activate based on the device name. 

Share this post


Link to post
Share on other sites

Well, RXB along with GRAMKRACKER added quite a few devices like RXB has device named BASIC that goes to TI Basic and EA that goes to REA cart.

That is not even counting fake DSR in GPL like RDSK that turned Lower 8K into a storage device for XB or Basic by Miller Graphics.

But these required the Miller Graphics GPL DSR in Assembly to work unlike the standard DSR that would only find Cards at >4000 only.

Do you remember the Mini Memory DSR device for storage?

There are others not mentioned like BOOT.

  • Like 2

Share this post


Link to post
Share on other sites

Any string without spaces up to 7 characters followed by a device name separator: '.' if you can find it in the DSRLNK lists in the DSR ROMS for file devices. 

 

Then you also have

 

<Device> '.' [ <dir> '.' ]* <filename> 

 

And then if you think of 'PIO.' as a device name, TIPI provides 'PI.PIO.' but you won't find it in the ROM, just the 'PI.' part is in the ROM.  Much like PI.CLOCK, etc...

 

'CLOCK' 

'DSK0.' TIPI/classic99

'DSK[1-9A-Z].' HRD

 

The best old Texas Instruments software asks for a file, and gives you the liberty to enter a the full thing, try it, and just report the error : the 'other' option in Tunnels of Doom for example. Works with all the new fangled storage options like a fortune teller.

  • Like 1

Share this post


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

 

TI Disk Controller DSR:

  • DSK
  • DSK1
  • DSK2
  • DSK3

TI RS232 Card DSR:

  • RS232
  • RS232/1
  • RS232/2
  • RS232/3
  • RS232/4
  • PIO
  • PIO/1
  • PIO/2

...lee

 

7 hours ago, retroclouds said:

Do we have a compiled list somewhere of valid device/filenames as used on the TI-99/4a ?

I like to check if a text string qualifies as a device/filename.

 

Here's what I can think of (and I'm for sure missing a lot of storage devices)

  • DSK*
  • TIPI.*
  • PIO.*
  • IDE*
  • RS232.*
  • HDX.*

Others I can think of:

  • TP
  • SPEECH
  • ALPHON
  • MINIMEM
  • EXPMEM2
  • Like 2

Share this post


Link to post
Share on other sites
7 hours ago, InsaneMultitasker said:

Valid device names are not set in stone since a new peripheral or an updated DSR can mean additional, valid names.  Is there a specific reason you do not want to (or cannot) rely upon the DSR to validate the device name?   Even if you have a full list of 'valid' device names, the only names that will work are those corresponding to an installed peripheral.  Checking name validity can be redundant except in some cases, such as working with the level 2 opcodes that require you to discern which card/CRU to activate based on the device name. 

 

What I like to do in Stevie (the editor I’m working on), is to offer a possibility to open a file just by putting the cursor on a line in the editor and let the editor decide if it’s a potential device/file combination. If it is, you will get the option to load the file into the editor.

So a predefined list of strings to match against would be my preferred way to go. Having said that, I can make this list configurable by the user. Thay way as new devices appear they can simply be added to the list.

 

Suppose the editor has following lines:

 

COPY “DSK1.ABC;S”

TIPI.STEVIE.SRC.ABC;S

 

If I put the cursor on the 1st line at position “DSK1” or on the 2nd line at the beginning of the line, then the editor should offer me the possibility to read the file into the editor. 

 

Having said that, letting the DSR validate if it’s a valid device name is an interesting idea that might actually work (I mean in terms of speed) if the option kicks in if I select the “open file dialog”. Oh and the editor is only using level 3 opcodes. I like to keep it that way because I think it offers best compatibility possible.

  • Like 2

Share this post


Link to post
Share on other sites

Ah, neat, that sounds like a cool feature!!   What about an option for the user to select the text to feed into the open dialogue.

 

It's not released yet, but perhaps include the SDD99 device "SDDx"

 

 

  • Like 3

Share this post


Link to post
Share on other sites
On 6/6/2020 at 3:19 AM, Kchula-Rrit said:

Is there a convention for specifying files or devices in a TI system? 

 

While your first first sentence of this thread mentions for a TI system, I should note the Geneve 9640 running in GPL (TI-99/4A emulation mode), added TIP1. as a device name which should not be confused with TIPI.  

 

Beery

  • Like 2

Share this post


Link to post
Share on other sites

It would be better to do a version of what the p-system does. On startup, it scans the system for some DSR names it expects, in order to store their access parameters (CRU and entry addresses).

The DSRLNK routines typically scan the system to find where a certain DSR name is located, if it exists. If you write yourself a DSRSCAN routine, which instead scans all possible cards for all possible names, then you can create a list of what's available in the machine at hand. That it takes a few fractions of a second to do this doesn't matter. You'll only do it once, when your program starts.

  • Like 4

Share this post


Link to post
Share on other sites

Wow!  Just wanted to let you know that I'm still here.

 

I have to apologize for being AWOL since June.  My battery-powered TI is having problems, and my Win98 development machine has been mothballed since a wildfire-evacuation scare last summer.  I've been looking at it and thinking, I have to get everything back together.  The other excuse is that my model train layout wanted equal time.  8-)

 

Good to know that my question has piqued some interest.

 

K-R.

 

  • Like 3

Share this post


Link to post
Share on other sites
1 hour ago, Kchula-Rrit said:

The other excuse is that my model train layout wanted equal time.  8-)

Man, I wish I had room for that.  I have built up a rather nice collection of HO scale Burlington Northern rolling stock.

Share this post


Link to post
Share on other sites

In my teenage years my family lived 100 feet from a BN line; used to watch them go through town.  Always thought they had a good-looking paint scheme.  The layout is my first, a 3x8 foot oval with some sidings in N-Scale.  Free-lanced short-line, so I can use my collection of locomotives from all sorts of carriers.  Been wanting to build one for 50 years, and just decided to finally do it while I'm still breathing.

 

Now, back to TI stuff.

 

K-R.

 

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, Kchula-Rrit said:

... decided to finally do it while I'm still breathing.

 

That's the best time to do it in my experience. :) 

 

  • 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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...