jhallen / exorsim

Motorola M6800 (6800) Exorciser / SWTPC emulator
Other
43 stars 10 forks source link

Compile and execution errors #6

Open crestr1 opened 1 year ago

crestr1 commented 1 year ago

Compile erriors.txt execution errors.txt

Also had a recollection that all *.ED would "LIST" as text or copy to #CN

not sure if S record assumptions are made that involves checking check-sums after assuming they exist in the *.ED

since the type and suffix are same for all .ED i would have thought that all would be treated as .SA

something going on here I thought *ed was type 5 (ASCII) some I looked at are type 3 (object)

crestr1 commented 1 year ago

Two mdos 6800 disk images attached in this .zip Some mdos 6800 suff.zip one image has the 6800 6809 assembler and bits and pieces including another copy of MEDOS. There probably is a later rev of the assembler someplace. The other disk contains source disassemblies and info files on EDITM from when we ported it to 6800 QDOS

crestr1 commented 1 year ago

One for the TODO list that would help a lot understanding MDOS derivative systems

mdos.c commands that produce a report of RIB entries as part of the output (start and load address) should also report the file attributes from the directory entry as well. This would be a big help. Some MDOS derivatives have file attributes defining operational eligibility beyond the MDOS usuals . The 16 bits of the directory entry $C-D bytes should be reported just as a binary value although W,D,S,C,N,X,X,X X,X,X,X,X,X,X,X could confirm MDOS attributes that should be universally applicable. The W,D protection attributes and the other letters are 0 if the bit is not set.

jhallen commented 1 year ago

I found the backspace function in E, am thinking of patching it. But E has a terrible bug. There is no bounds checking on the input buffer for backsapce. So if you keep hitting backspace like 100 times you'll eventually see it emitting random characters to the screen (after you get past the many NULs)- whatever's in the memory before the input buffer.

crestr1 commented 1 year ago

We really appreciate your look-before-you-leap thoroughness before patching in code to help make stuff work better. Thanks Joe, maybe this is a problem that only deserves a warning. Some of us with inaccurate typing skills would really appreciate the backspace working over the few key miss-hit characters we regularly need to correct.

If you wanted to be really belt-and-braces maybe an 40 characters limit on consecutive backspaces

jhallen commented 1 year ago

OK, I've patched both the 6800 and 6809 versions of E, backspace now works correctly in them. The patch is using a seemingly empty area of the image, so we'll see if this works out long term.

I wrote notes about these patches here: https://github.com/jhallen/exorsim/blob/master/doc/notes.md

I kind of wish E would always start out in scroll mode.. I might work on that next. Anyway it was an option in ECUSTOM.CF for E 3.14.

crestr1 commented 1 year ago

Thanks Joe, Will try to get you copies of the missing manuals, have them, but need to have them cleanly cut in half along the stapled fold that binds them so they will go into a scanner hopper.

crestr1 commented 1 year ago

Official Update MDOS6800 RASM09.3.04

MDOS 6800-RASM09.zip

It is on an official 6800 release distribution disk image (mount as drive :1 copy RASM09.CM:1 to :0)

crestr1 commented 1 year ago

MEDIT.CM MDOS 6800 EDIT.CM look-alike. You can assemble this MED22.SA source code for 6800 or 6809.
The 6800 executable here is named MEDIT.CM

MEDIT (EDIT Lookalike) Source.zip

Written by Dave Hatch in Australia to get some big improvements to 6800 EDIT.CM when that was the editor in MDOS. it responds to the same commands as the original but has some powerful extra commands

jhallen commented 1 year ago

I've update RASM09 and included MEDIT in mdos.dsk and mdos09.dsk. This is very cool.. my other popular open source project is my text editor JOE, it was popular in the 90s on Linux since it was similar to WordStar and Turbo-C, so many people transitioning from MS-DOS to Linux used it. So I'm wondering who Dave Hatch is.. couldn't find anything about him on the web.

Sad text editor news today, Bram Moolanaar, the author of VIM (the popular vi editor clone) died.

crestr1 commented 1 year ago

MY assembly of MEDIT for 6809 assembles no errors but MEDIT search command fails. I was expecting the code would need a tickle to go to 6809 all working. It is the S"string" that fails in my system. could be a problem in the skip macros I think Dave Hatch is no longer with us, He designed the first computerized traffic light controllers these replaced the big grey UNITAC boxes of telephone quality relays that previously did the job

jhallen commented 1 year ago

I think the problem is that the code is using the stack pointer as a data pointer to accelerate string compares and moves (to get around the usual lack of registers problem of the 6800). But there is a difference between the 6800 and 6809: PSH pre-decrements on the 6809, but post-decrements on the 6800.

One crude fix: replace PSHA with STA ,S; LEAS -1,S and PULA with LEAS 1,S; LDA ,S

Better would be to switch to using Y or U for the 6809..

crestr1 commented 1 year ago

Some manuals: M68BAS(D3).pdf M68DOWNLD(D1).pdf M68EDITORM(D3).pdf M68LLD(D4).pdf Motorola Floppy Interconnect.pdf More but they violate the 25mb limit: any tricks please ? Cobol 39mb, Fortran 51mb, Assemblers 38mb

Not allowed RAR multi volume and none zip to meet 25mb limit

crestr1 commented 1 year ago

One crude fix: replace PSHA with STA ,S; LEAS -1,S and PULA with LEAS 1,S; LDA ,S

Better would be to switch to using Y or U for the 6809..

To keep MEDIT simply maintainable in form for both processors my feeling would be to handle the stack crudely with macros just directed by a 6800 or 6809 target switch., Although there is the speed penalty that would get big on large searches involving MEDIT macro invocations..

jhallen commented 1 year ago

Manuals: very awesome! I'm going to pass these along to bitsavers if you don't mind.

Do you use gmail? Maybe upload them to google drive. Once there, you can provide a shareable link.

jhallen commented 1 year ago

Actually maybe the best way is to upload them to archive.org: I've never tried this, but it looks like you create an account then it allows you to upload.

jhallen commented 1 year ago

I've updated medit (it's in mdos09.dsk): there is now an EQU for the CPU type. I ended up correcting S after LDS and before STS, and left the PULs and PSHs alone. It's too bad the assembler doesn't already have a symbol for the target CPU.

Anyway search seems to work, but I'm not an EDIT/MEDIT expert.

crestr1 commented 1 year ago

thanks for the medit fix Joe

link to remaining 3 manuals on we-transfer https://we.tl/t-cBAjNTrh19

Will do some more small manuals today

crestr1 commented 1 year ago

The link above expires in 7 days More manuals: EXORBUS.zip M68MODOS(D).pdf M6800_Co-Resident_Editor_Reference_Manual_1977.pdf (MDOS EDIT.cm also direct user load under EDOS) MODOS is on making MDOS rom alternatives

jhallen commented 1 year ago

I got them all, it's interesting seeing embedded FORTRAN with a real time OS. I'm going to have a make a blog post about this at some point..

For COBOL, do you have the operations manual? The reference manual mentions it.

I found this talk about the SPHERE computer- a 6800-based computer from 1975. It 8 inch drive looks like an EXORdisk-I

https://sphere.computer/

VCF talk

crestr1 commented 1 year ago

I think in the time of the Cobol there were lots of examples etc on floppy disks which I'd have someplace. Cobol was killed off by Basic of which there were several and even MDOS compilers for basic from Software Dynamics. The real miracle of cobol was the print control it offered in "picture" clauses, but well programmed basic could offer this too

I'd say the sphere computer would run into RFI radiation compliance problems nowadays

crestr1 commented 1 year ago

I have struck a problem recovering stuff from CMI word processor disks. I;m getting buffer overflow messages out of MDOS because the files seem to have no constraints on line length. It appears that the lines are a paragraph long if the user has not deliberately formatted a work. The files copy ok but will not list or print without buffer overflows. and of you copy them to #CN most of the text is lost by truncation without wrapping.

crestr1 commented 1 year ago

Fortran manual update M68FTN(A1).pdf

jhallen commented 1 year ago

CMI word processor disks

Can you share one of them? (Are these MDOS or EDOS? You shared some EDOS CMI source disks earlier..)

I've seen a similar problem where if you abort the simulator, or reset the real EXORciser temporary files are sometimes left in a bad state. It allocated space for the file, but hasn't written anything yet and thinks the file size is the entire pre-allocated size. Remember MDOS ASCII files have space compression, so it would interpret junk as compressed spaces and expand them, so when I "mdos cat" the file I get a huge amount of data.

COBOL

Yeah, I'm interested if they really implemented ISAM files for it. Looking at the reference manual it looks like they did, but I haven't tried it. Between ISAM and the screen handling you could write database CRUD applications. There is a utility to create the data disk, but need the operator manual to try it.

FORTRAN

FORTRAN-IV was the most portable language available in the mid-70s. So there was this bizarre situation where compilers were written in FORTRAN-IV- a language with no character string support. I can see in the brochures that Motorola did this, the 6800 cross assembler and simulator for the PDP-11 (and other common computers of the time) was delivered as FORTRAN source.. (I don't suppose you have any of these?)

crestr1 commented 1 year ago

The Cyword *.SA files get truncated to a default line length but wrapping does not take place. in this a truncated line could contain a whole paragraph of many lines that become visibly lost. MDOS DUMP reveals this. Copying these files to #CN or #LP gets buffer overflow messages.

May need a recovery program like a text print formatter like we once used to print software manuals for my stuff in the 'MD_word' disk image in the following zip is the source code for such a text processor along with files it once printed to user manuals Text processor.zip

crestr1 commented 1 year ago

I may still have a fortran card deck and mag tapes spools for the 6800 cross assembler we ran on a CDC mainframe, maybe some manuals too, a friend of mine wrote lots of meta languages in fortran which compiled code for 6800s on these mainframes.

I ran across some disks of his 6800 motorola fortran stuff creating a data entry language called MIL I think this was for a big oil company

jhallen commented 1 year ago

CYWORD

First extract the files using mdos, so that they are in some directory in Cygwin (like use mdos x).

So I would delete the control characters. In Cygwin you can do this with the "tr" command:

    tr -d -c '[:print:]\r\n\t' <ac1.sa >ac1.txt

Try "man tr" to see what this does: it deletes (-d) the complement (-c) of all printable characters plus carriage return (\r), linefeed (\n) and tab (\t).

So now ac1.txt is an unformatted document, you can open it with WordPad in Windows. WordPad will treat each long line as a paragraph.

If you want a text file, you can use the UNIX "fold" command (you may have to search for this in Cygwin Setup if it's not already installed):

    fold -s -w 70 <ac1.txt >ac1.out
  -w 70  sets the right margin

  -s        split only on spaces, otherwise it tries to fill badly

Now you can read the file with "cat", "more" or any text editor.

You can put the two of these together like this:

    tr -d -c '[:print:]\r\n\t' <ac1.sa | fold -s -w 60 >ac1.out

You can process all of the files in the directory like this:

   for a in *.sa
   do
   echo Converting $a
   tr -d -c '[:print:]\r\n\t' <$a | fold -s -w 70 >$a.txt
   done

You can make a small shell script to convert a single file. Make a file named 'fix' containing:

       tr -d -c '[:print:]\r\n\t' <$1 | fold -s -w 70 >$2

Make it executable with: "chmod a+x fix"

Now you can say: ./fix ac1.sa ac1.txt

jhallen commented 1 year ago

I wrote a better script, I checked it in- it's called "cyfix". Use it like this:

cyfix ac1.sa ac2.sa
  Converting ac1.sa to ac1.txt
  Converting ac2.sa to ac2.txt

cyfix *.sa
   Converts all files..

This is the code

for a in $*
do
NEWNAME=`echo $a | sed 's/.sa/.txt/'`
echo Converting $a to $NEWNAME
tr -d -c '[:print:]\r\n\t' <$a | fold -s -w 70 >$NEWNAME
done
jhallen commented 1 year ago

But will need to make sure you have "tr", "fold" and "sed" programs in Cygwin.

crestr1 commented 1 year ago

All my Cobol demo disks As recovered and trimmed to 256,256 3 disks mdos 6800 COBOL.zip

jhallen commented 1 year ago

One more thing may help: try my text editor JOE (it's a simple screen editor, somewhat like WordStar), you can install it through Cygwin Setup, it's included in the distribution.

In JOE, you can reformat each line that is a paragraph by positioning cursor on the line, then hit Ctrl-K J

You can leave the help text on the screen with Ctrl-K H (there are multiple screens of help, use ESC , and ESC . to cycle through them).

Use Ctrl-K X to save and exit.

Use Ctrl-C to abort and exit.

crestr1 commented 1 year ago

Many many thanks Joe. cyfix is magic on these *.SA text files: mdos.c grabs em in one go and cyfix makes them readable: a nightmare wonderfully solved by two simple consecutive command lines.

The required tr, fold and sed were already in my minimal Cygwin installation

crestr1 commented 1 year ago

This will amuse you Joe it is our 6800 meta language written in Fortran early in the 1970s

Mil mainframe meta lang.zip

The CDC Cyber mainframe had a 6800 assembler on board and this stuff was a deck of cards that was fed to it. It was expensive to use it was before computer terminals so tele-computing did not exist

fort.sa fort1.sa are the code. fort.sa contains a description of the language

crestr1 commented 1 year ago

Another difficulty: Some MDOS applications (in drive 0) need a series of disks to be mounted as :1 (drive 1) is there a way to do this without breaking the current running application that is asking for a new disk in drive 1 example: book.sa in the attached zip of the three disks for the application:

manuals processort.zip

its is 6800 MDOS

crestr1 commented 1 year ago

exor mdos.img crash running textpc.cm either on supplied .img or as :1 under mdos.dsk

Crashes textpc.cm.zip

Disk image runs perfectly in Exorciser gives 'no input file message'

jallennk commented 1 year ago

Yeah, I will add this feature. I'll work on it this weekend. I had been procrastinating on it because I know I'm also going to want to have at least tab-completion at the filename prompt.

On Fri, Aug 11, 2023 at 1:26 AM crestr1 @.***> wrote:

exor mdos.img crash running textpc.cm either on supplied .img or as :1 under mdos.dsk

Crashes textpc.cm.zip https://github.com/jhallen/exorsim/files/12318778/Crashes.textpc.cm.zip

— Reply to this email directly, view it on GitHub https://github.com/jhallen/exorsim/issues/6#issuecomment-1674227434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4SAQHXKLBCYA4HTLEI24TXUW66VANCNFSM6AAAAAA2CVQLOE . You are receiving this because you commented.Message ID: @.***>

jallennk commented 1 year ago

I've added the run-time disk switching feature. To switch the disk in drive1, hit Ctrl-C, then type "drive1 path", where path is the path to the disk image to use. You can type "drive1" alone to show the current path.

Also you can now specify a specific drive on the command line, instead of having to list all of them. For example,

./exor -1 disks/fred.dsk

Uses disks/fred.dsk for drive 1 and uses the default "mdos.dsk" for drive 0.

You can also now give a paths to the disk image and the initial memory image in environment variables. This way you don't need "mdos.dsk" and "exbug.bin" to exist in the current directory.

export EXOR_DRIVE0=/home/joe/mdos.dsk 
export EXOR_EXBUG=/home/joe/exbug.bin 
export EXOR09_DRIVE0=/home/joe/mdos09.dsk 
export EXOR09_EXBUG=/home/joe/exbug09.bin 
./exor -1 fred.dsk     <- will use -0 /home/joe/mdos.dsk and --exbug /home/joe/exbug.bin
crestr1 commented 1 year ago

Been a busy boy Joe, Thanks. Sorry another bug ./exor Crash ./exor mdos.dsk =RASM09 XCOM:1,TCOM:1,DOSEQU:1,SCRDRV:1;L=#LP M6809 MACROASSEMBLER 3.04 COPYRIGHT BY MOTOROLA 1978 Invalid opcode=$55 at $3186 112992506 A=77 B=04 X=0002 SP=63C1 -----C 3186: 55 Huh?B

112992507 A=77 B=04 X=0002 SP=63C1 -----C 3187: 27 04 BEQ 318D

6800 Monitor: Ctrl-C to exit, 'c' to continue, or type 'help'

crestr1 commented 1 year ago

Ran the above under 6809 to give that a bit of a thrashing it worked really well

scrdrv.pdf

this is a video terminal running as a task under my real time exec

crestr1 commented 1 year ago

Found another cabinet of early floppies:- Some early EDOS probably boots (S records on disks) but booting may have been an EDOS controller ROM function some source code of various revs on disks, this may answer some of the open questions. Original captures and E edited to size Edos Boot disks.zip

crestr1 commented 1 year ago

EDOS 2.4 is now alive and here

listing-2.pdf

Hope this will help resolve the recovery differences between edos.exe with x option and mdos EMCOPY.CM it appears deleted files are a problem showing up in edos.exe recoveries

crestr1 commented 1 year ago

OOps

crestr1 commented 1 year ago

G'day Joe Thanks for those very welcome changes but I'm having "drive1 path" problem under cygwin:

6800 Monitor: Ctrl-C to exit, 'c' to continue, or type 'help' % drive1 No disk in drive 1 % drive1 path C:\cygwin64\home\w10pman\work\exorsim_all_02\dblank.dsk Couldn't open 'path'

just wanted dblank.dsk from current working directory if I startup as ./exor mdos.dsk dblank.dsk and I "drive1" i just get "dblank.dsk"

but giving it that path is unacceptable

% drive1 path dblank.dsk Couldn't open 'path'

crestr1 commented 1 year ago

Maybe we could simplify the commands and default to working directory D0? D1? D2? D3? ask path gets Dn= response (exactly in the form for a set command) D0= D1= D2= D3= set path The path from the current exorsim working directory follows the = but allow items to be in folders in current working directory too

crestr1 commented 1 year ago

./exor mdos.dsk Crashes. It still works fine in Exorciser

** MDOS 3.05 =DIR :1 DRIVE : 1 DISK I.D. : TEXTPRO TEST .SA TEQU .SA TEXTIO .SA TEST2 .SA TEXTIO .CF IOCBMAC .SA TEXTPX .SA TEST1 .SA TXTPC09 .CF TEXTPX .RO INFO .SA TXTIO09 .RO TXTPX09 .RO TEXTPROC.CF TEQU .RO TEXTPC .CM TEXTIO .RO TXTPC09 .CM TOTAL DIRECTORY ENTRIES SHOWN : 018/$12 =TESTPC:1 WHAT? =TEXTPC:1

Invalid opcode=$00 at $2000 1364205 A=E8 B=53 X=2000 SP=5F8F ------ 2000: 00 Huh?

1364206 A=E8 B=53 X=2000 SP=5F8F ------ 2001: 00 Huh?

6800 Monitor: Ctrl-C to exit, 'c' to continue, or type 'help' % **

jallennk commented 1 year ago

Cygwin paths

You have to say it like this:

drive1 /cygdrive/c/cygwin64/home/w10pman/work/exorsim_all_02/dblank.dsk

So to refer to C:\ you need to use /cygdrive/c

Also, C:\cygwin64 is Cygwin's fake root directory (ls / and ls /cygdrive/c/cygwin64 should show the same contents).

So you can say:

drive1 /home/w10pman/work/exorsim_all_02/dblank.dsk
jallennk commented 1 year ago

EDOS

Very cool, so from the source code I can see that 0x80 is the deleted directory entry mark and 0xFF is the end of directory mark. I've made these changes to edos.c.

So are these disks bootable in your EXORciser? I don't understand how they boot... the operating system doesn't seem to start with a second stage boot loader like MDOS. I guess I could load the OS as a S19 file..

jhallen commented 1 year ago

I've created an install script for exorsim. So now to install,

"run as administrator" the Cygwin terminal (this option appears if you right click on the Cygwin terminal icon, or if you search for it in Windows). Then "make install". You have to "run as administrator" otherwise you get permission errors.

It installs the files in /usr/local/bin and /usr/local/share/exorsim (i.e., C:\cygwin64\usr\local\bin).

After this installing, you can run "exor" from any directory, not just the git repo. It will find the data files in /usr/local/share/exorsim. The files there are supposed to be constant, so for the disk images it copies them to $HOME/.exorsim (the hidden directory .exorsim in your Cygwin home directory).

The search order for data files is always:

  1. find mdos.dsk in current directory
  2. find mdos.dsk in $HOME/.exorsim
  3. find mdos.dsk in /usr/local/share/exorsim

This way it will continue to work the old way, where the data files had to be in the current directory.

jhallen commented 1 year ago

crash RASM09 XCOM:1,TCOM:1,DOSEQU:1,SCRDRV:1;L=#LP

Can I have these files? Or maybe you already gave them to me, I'll take a look..

jhallen commented 1 year ago

crash RASM09 XCOM:1,TCOM:1,DOSEQU:1,SCRDRV:1;L=#LP

Can I have these files? Or maybe you already gave them to me, I'll take a look..

Never mind, yes, I have them.

jhallen commented 1 year ago

Actually I think I only have the TEXTPC in Crashes.textpc.cm.zip. I looked at the sector on the disk image, It starts with 32 0s. If I modify exorsim to treat these as NOPs, then it seems to run (although the textproc.cf seems to get into an infinite loop- it prints the same thing over and over).

If I treat the 0s as NOPs, it picks up running with the 7E 20 A8 (JMP $20A8):

% d 2000
2000: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 ................
2010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 ................
2020: 00 7E 20 A8 8D 05 7F 22  46 20 3F A6 0A 85 40 26 .~ ...."F ?...@&
2030: 05 C6 23 7E 20 EC A6 01  85 10 27 05 C6 25 7E 20 ..#~ .....'..%~ 
2040: EC 39 B6 22 4A F6 22 49  B0 22 48 B7 22 4C F2 22 .9."J."I."H."L."
2050: 47 F7 22 4B 39 B6 22 47  A7 04 B6 22 48 A7 05 B6 G."K9."G..."H...
2060: 22 49 A7 06 B6 22 4A A7  07 39 7D 22 46 26 21 8D "I..."J..9}"F&!.
2070: E4 3F 04 27 09 C1 09 27  02 20 70 7C 22 46 FF 22 .?.'...'. p|"F."