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

Seems that files can be type 5 or 3 at the discretion of the copy options, 3 qualifies them for EXBIN use to be binary converted or linked. but unfortunately disqualifies them for some ASCII uses and listing. normally I bring them all in as ASCII in one go, my filename system under EDOS uses no informative suffixes although o and s is used in the names to denote type. They should be easier to manage all as ASCII suffix changes should be able to entirely manage their use (if any) in MDOS

crestr1 commented 1 year ago

I also noticed that copying from the exorsim text screen causes jumbling of the screen display, this may only be due to the compile problem warning.

jallennk commented 1 year ago

The compiler warnings should now be fixed. Also I added an "x" (extract all files) option to mdos.c, should help with bulk extracting.

Hmm, tomorrow I'll add a command to "mdos" to set the file type to 5 on any .ED files that don't look like they are object files (that don't begin with D).

It's sneaky that COPY converts the binary to text, I didn't know or remember that it did that. Are you trying to extract these out of the EXORciser completely (so then do you want the binary or text versions?) or are you trying to get these to actually work in MDOS (to assemble and link)?

(I need to find the manual that has the binary object file format- long ago I wrote a cross-reference tool that read a bunch of these object files and made a nice cross reference listing of all the XREFs and XDEFs between modules. We were linking many files together and the cross reference was useful to go along with printed listings).

Give the new "edos" command a try to read from the EDOS images directly. I tried extracting files from those other EDOS images you sent, it looks like it's working. I don't understand what happens to the disk layout for bootable EDOS-II disks, but at least none of the ones you sent look any different, and it looks like the maximum number of directory sectors really is 5 (so 55 files max).

It uses a simple heuristic when reading files: if the file begins with 'D' assume it's an object file and leaves it unchanged (except delete NULs at end). Otherwise treat it as an ASCII file. For ASCII files, it converts line endings to UNIX (to a single linefeed- this fixes a few cases where the file has LF-CR instead of CR-LF) and it deletes the padding NULs. At least on Linux, I found that the NULs were confusing programs into thinking that some S-record files were UTF-16 encoded.

Do you think it's a good idea to delete the padding NULs? I think it's better this way if the goal is for people to look at the files or for them to be used by modern tools. On the other hand, if they are going to be loaded in a real system, the padding NULs might be needed. I guess it should be an option.

jallennk commented 1 year ago

Well I added it. "mdos disk.img -F" fixes the file types.

 ./mdos mdos.dsk -F
  Changed dp0s2.ed to ASCII
  Changed wavs5.ed to ASCII
  Changed dp3sf.ed to ASCII
  Changed dp4s9.ed to ASCII
  Changed vdmsb.ed to ASCII
  Changed dp2sc.ed to ASCII
  Changed macb8.ed to ASCII
  Changed lges3.ed to ASCII
crestr1 commented 1 year ago

Thanks Joe, The thought you are giving to this is really appreciated its a big help on identifying my potential problems.

All the source code will be re-assembled to listings in exorsim, this is seems to present more meaningfully, the external print stream will be extremely important.

exorsim has become a vital component in my work it is so fast and easy and the terminal simulation is a real treasure

crestr1 commented 1 year ago

Really encouraging progress

a double sided mdos disk and a edos disk I tested the edos.exe on follows New disks.zip

I made some code assemblies on this mdos disk to check all is well, all the .ed are ASCII, not tried the type correction utility yet. only need to weed out unprintable. This now gives me the .ls files i think i need to work with, my initial thinking is to put them into pdf files with other explanatory paragraphs. Any tricks you know to get the *.LS pagination across into the PDF would be appreciated.

My compilers seem to be fussier than yours:-

Compile probs.txt

jallennk commented 1 year ago

I've included an ASCII to PostScript converter I wrote in the mid 90s, it's called "lpf" (should build when you type "make").

To use it:

./lpf listing.lp listing.ps     (listing.lp is the printer file from exorsim)

You then have to convert the PostScript file to .PDF. In Linux, I use "ps2pdf", which is a script which is part of Ghostscript:

ps2pdf listing.ps listing.pdf

You could install Ghostscript in Cygwin (I'm sure it's one of the packages), or use Adobe Acrobat Distiller.

Anyway, "lpf" has some options, try "./lpf --help". But I've set the defaults so that they will work with the 120 width, 66 line output from rasm.

"lpf" writes 60 lines on each page. The output from rasm is 66 lines, so by default "lpf" deletes the first 6 lines of each input page. You can control the margins of the output with "--lmargin" and "--tmargin". You can control the input margin skipping with "--topskip" and "--botskip".

jallennk commented 1 year ago

I tried this site to convert the .pdf listing into a Word document:

https://smallpdf.com/pdf-to-word

It works, but don't know how editable the result is... but at least there is one way to incorporate a listing into a modern tool.

crestr1 commented 1 year ago

Thanks for V4 Joe. been giving it a thrash - really impressive. Thanks for the print and PDF considerations its a big help. Though would like an lp raw option that is an infinite txt, that just gets added to if you do not delete it. Maybe would like to pipe it thru grep and/or postscript later. Having a printer all the time can be really helpful keeping track of changes

Tests discovered a Bit of a prob here: Duplicate file name Anomoly in edos.exe: Could be both the image file and edos.exe though

edos anomoly.txt

New disks.zip a second copy

jhallen commented 1 year ago

So there really are multiple directory entries with the same name. Sometime they point to the same file, but in this case the "mark" byte is different between them. Sometimes they point to different files, but then they have different values in the "unknown" byte. "Mark" and "Unknown" are two bytes of the 11 byte directory entry that I don't know what they mean... sure you don't have an EDOS-II manual anywhere? :-)

Anyway, I've modified "edos.c" so that it extracts these to different files, like this. You'll have to check the duplicates manually:

./edos  M8_ACT_s0E.img x
Extracting dp0o2
Extracting dp0s2
Extracting dp2oc
Extracting dp2sc
Extracting dp3of
Extracting dp3sf
Extracting dp4o9
Extracting dp4s9
Extracting dp5o9
Extracting dp5s9
Extracting dvro3
Extracting dvrs3
Extracting fmnoh
Extracting fmnsh
Extracting gesob
Extracting gessb
Extracting inil8
Extracting inil8
File already exists, renamed to inil8.1
Extracting inil8
File already exists, renamed to inil8.2
Extracting inio8
Extracting inio8
File already exists, renamed to inio8.1
Extracting inis2
Extracting inis3
Extracting inis4
Extracting inis4
File already exists, renamed to inis4.1
Extracting inis5
Extracting inis5
File already exists, renamed to inis5.1
Extracting inis6
Extracting inis7
Extracting inis8
Extracting inis8
File already exists, renamed to inis8.1
Extracting inpom
Extracting inpsm
Extracting kefoh
Extracting kefsh
Extracting lgeo3
Extracting lges3
Extracting lil1
Extracting lil1
File already exists, renamed to lil1.1
Extracting logo2
Extracting logs2
Extracting macb8
Extracting mpko6
Extracting mpks6
Extracting plao0
Extracting plas0
Extracting tabob
Extracting tabsb
Extracting vdmob
Extracting vdmsb
Extracting wavo5
Extracting wavs5
jhallen commented 1 year ago

Though would like an lp raw option that is an infinite txt, that just gets added to if you do not delete it.

OK, I've changed how this works. The default is to append any line printer output to a file called "listing.lp" (it does not get deleted).

But there are options to change the file:

--lpt file          Save listing to a file (it gets deleted first)
--append file  Append listing to a file (it does not delete, append-only)
crestr1 commented 1 year ago

all the time printer works great thanks Joe,

problem in exor.c line 946 option parsing fails so cannot try off and on options any option defaults to help screen:

    int x;
    int diskn = 0;
    int gotox = 0;
    mon_out = stdout;
    mon_in = stdin;
    char *facts_name = "facts";
    char *lpt_name = "listing.lp";
    int lpt_append = 1;
    for (x = 1; x != argc; ++x) {
            if (argv[x][0] == '-') {   
jhallen commented 1 year ago

This is working for me- can you show me what command you are trying that is not working? For example, I try:

./exor --append fred

=LIST TEST.SA;L

And the listing ends up in file "fred".

crestr1 commented 1 year ago

Sorry to bug you but more tests Joe,

But listing.lp should have an infinite life as an automatic default and is there and active as long as no other listing file has been nominated for creation or append. It seems to get recreated under default append and named append

documented in the attached txt file.

BAD.txt

Some ps listings also, does not exit with clean process list, this may be part of the (or my) problem

jhallen commented 1 year ago

Sorry, you are right, was not opening for append due to a typo. I just checked in a fix.

To exit exor, you should hit Ctrl-C to get to the monitor prompt '%', then type "quit", like this:

MDOS  3.05
=Interrupt!    (hit Ctrl-C here)
    1292643 ---- Subroutine at FA8B processed by simulator ---- RTS executed ---

>   1292644 A=00 B=00 X=0120 SP=E7E7 ------          FAA2: 84 7F    ANDA #7F                 

Type 'help'
% quit

Bye
jallen@jallen-HP-Pavilion-Laptop-15-cs2xxx:~/exorsim$ 

If you hit Ctrl-Z, it will suspend exor. The number in the square brackets is the job number. So at the shell prompt you can get a list of background jobs with "jobs", and can kill a specific one with "kill":

MDOS  3.05
=       (hit Ctrl-Z)
[1]+  Stopped                 ./exor
jallen@jallen-HP-Pavilion-Laptop-15-cs2xxx:~/exorsim$ jobs  (list jobs)
[1]+  Stopped                 ./exor
jallen@jallen-HP-Pavilion-Laptop-15-cs2xxx:~/exorsim$ kill %1   (kill job #1)
jallen@jallen-HP-Pavilion-Laptop-15-cs2xxx:~/exorsim$   (hit Enter)
[1]+  Terminated              ./exor
jallen@jallen-HP-Pavilion-Laptop-15-cs2xxx:~/exorsim$ 

Or you can resume a suspended job with "fg" or force it to run as a background job with "bg" (which makes no sense for a job waiting for terminal input, but can be useful for long running programs). I noticed that "exor" does not resume properly because it leaves the terminal in the wrong mode, I'll work on this.

This job control stuff is a feature of the UNIX shell, comes from UC Berkeley's "BSD" UNIX.

jhallen commented 1 year ago

A faster way to exit "exor": hit Ctrl-C twice.

Also I fixed Ctrl-Z suspend. You can type "fg" at the shell to resume it.

johnsonjh commented 1 year ago

Just wanted to say I've been quietly following all this recent work you guys have been doing and it's excellent.

crestr1 commented 1 year ago

G'day Joe What you have made here is just so fast and terrific to use, many thanks

Just looking at the all the PDFs I've made from EDOS files i think a problem with CR/LF giving a double spaced end result PDF

Making ps from. MDOS lp.zip

Tool Chain is: bhfs1.sa comes from EDOS recovery edited to BACH.sa, MDOS put to mdos.dsk RASM to listing.lp, lpf to listing .ps, converted to PDF on net freebie converter.

i think in transfer by MDOS PUT the 0As become 0Ds A useful fix may be in conversion to .ps to allow both CR/LF formats however listing.lp could use more width if possible but is usually needed DOS formatted

jhallen commented 1 year ago

Hi Tony,

OK, I've modified edos and mdos to use MS-DOS line endings instead of UNIX. mdos will now accept either format when "putting", so this should fix the problem where you get double-spacing when "putting" an ASCII file onto an mdos disk image.

I'm not sure I understand what you are saying about the .pdf file: the one in the .zip file looks OK to me- no double-spacing. Is there a problem with it that I'm missing? The only case I can think where you would see double spacing if you had "put" an MS-DOS file on an mdos disk image and then printed it.

The listing.lp file should be in MS-DOS format: mdos (the operating system) prints with CR-LF.

"lpf" does not care what the format is, MS-DOS or UNIX will work.

BTW, in Linux (WSL) there should be a command "hd filename" to print a hex-dump of a file.

I can just imagine younger-you tediously entering a Bach Fugue in assembly language using EDOS "edit" :-)

Thanks! Joe

crestr1 commented 1 year ago

Thanks Joe, I really appreciate this help,

Sorry my comments on the pdf double spacing is wrong, it is the line spacing that appears unusual,must be an artifact of the typeface chosen.

About to can using WSL and go back to using Cygwin you cannot find where the WSL filesystem backups are in Acronis backups. I often need to get files out of old backups. Ms has carefully hidden the windows pseudo net port that gets you into WSL. It works a bit better if you install the linux in a WSL2 Docker container but that brings lots of CPU resource gobblers with it. Cygwin is just so much easier to live with it has a firm footing in both worlds and i've been running it in another computer shadowing the work under Ubuntu and WSL in a new AMD w10

Only the days of invention bought hard work in entering music this way, this resolved in several ways as the M8 morphed into the CMI after I ported MDOS to the Qasar dual CPU to make QDOS, but the direct descendant of this was CMI MCL (music composition language) which linked to the timing requirements of film and advertising media production. MCL allowed a composer to also add studio staff directions on applying the sounds and music in real time to the end media the composer was commissioned for but without his presence,. It could also apply sounds and silences under control of standardized clock tracks

crestr1 commented 1 year ago

What i really found useful in Cygwin was being able to quickly process the EDOS extractions to useful collections and file names. I used the WIN GUI to isolate the source text files with a ???s search that i could cut and paste to a source folder within the extraction folder and then i could "bulk rename" all to have .sa suffixes all this done in a folder tree rooted in the Cygwin exorsim base folder i found it very useful to be able to create folders amenable to ../edos actions that also had a foot in the windows world

crestr1 commented 1 year ago

G'day Joe, i think there is a problem in mdos.c it seems to corrupt the destination mdos.dsk if the 'put' path fails. the following zip contains some info and an example corrupted disk it is not a very recent problem.

Mdos put problem.zip

the disk was the default mdos.dsk image exor uses

jhallen commented 1 year ago

This should be fixed now, 'put' was not dealing with names in paths correctly. Also now it will complain for invalid MDOS names: they must start with a letter and be composed of only letters and numbers.

You can give a separate mdos name with put: ./mdos disk.dsk some/long/path/myfile file.sa <- myfile will be called file.sa on the disk.

crestr1 commented 1 year ago

Thanks Joe it works far more predictably now sometime i needed to put the path list in quotes "..." even for paths that cat will accept.

crestr1 commented 1 year ago

Sorry Joe, Using more of your great stuff for even more - some problems with EDIT.CM and E.CM EDIT.CM has lost mapping of the esc key so no user $ control to even exit "(@+E$$)" will not open an existing file you get ** 06 DUPLICATE FILE NAME (mdos OPEN function error ?) will create a new file directory entry of an empty file if the file name is new and you cntrl+C exit to close files need no user supplied suffix .SA is assumed and/or automatically appended

E.CM data entry cursor does not track entry line arrow on the screen left. (>) you can move the line pointer arrow up and down but the data entry cursor remains on the bottom line and the left and right arrows move the entry cursor only on that line

jhallen commented 1 year ago

I've fixed the ESC key problem (but have not tried it on Cygwin). The problem was that the ANSI to EXORTerm translation was eating them because it has to look for sequences like ESC [ A (up arrow). If this fix ends up not working in Cygwin, you can try "./exor --no_exorterm". This should definitely work, but E will not work in screen mode with this option.

I don't get the existing file error except when the output file already exists, as in: EDIT TEST.SA,BOB.SA If BOB.SA exists, it complains. If this is not normal, please let me know.

Yeah, if you hit Ctrl-C you get files in weird states. I'm not sure what to do about this. I remember the same thing would happen on the real EXORciser if you hit reset while in the editor (or you get SCRATCH1.SA and SCRATCH2.SA in E).

For the E problem, I'm still looking at it. If you start a new empty file, it seems to start out doing the right thing. But once you enter command mode (where the > is at the bottom), I don't know how to get back to edit/insert mode. I thought you used the I command (Insert command), but it's not working. But my readme file from years ago says that it should work, so I will try older revisions.

jhallen commented 1 year ago

So for E, I figured one thing out: The "I" (insert) command does not work if there are line numbers. So I don't know how to get back to insert/edit mode once you hit F1 for command mode. But if you use "RESE N" to remove the line numbers, then the I command does bring you back to insert/edit mode where the cursor works correctly.

jhallen commented 1 year ago

I figured out how to get back to edit/insert mode when there are line numbers: it's the "N" command, like "N 50" and you start editing line 50.

This works in scroll mode also: If you N an existing line, it shows you the old line and asks for the new one.

One more thing, the window needs to have 25 lines. My Cygwin window starts with 24 lines, so I have to expand it vertically by one. Otherwise weird things happen- the last gets scrolled off the screen.

crestr1 commented 1 year ago

My goodness Joe, don't you sleep :-)

the editing i need to do lately is generally trivial just to change options for assembly and include equates attached page shows it should not complain about an existing file.

MDOS EDIT CM.pdf

crestr1 commented 1 year ago

Will download again after you have considered the problem of existing names for EDIT. just in case it is a an MDOS OS open mode problem. EDIT.CM working would be fine for the moment. Could not live without exortem

crestr1 commented 1 year ago

Just tried it on my Exorciser and this does it too for existing names but not always.. It seems to allow it once at times

maybe to use this it forces you to give the edit a new name and you load the old using commands and that needs the ESC working

I'll install your latest changes to hopefully get the ESC thru and see where from there.

I tried the Motorola VT220 terminal and EDITM but this wants to use line numbers all the time, need to find where the manual is to see if this can be circumvented when you save.

crestr1 commented 1 year ago

It all looks good joe, excellent progress the ESC mods work OK with Cygwin in the limited time i've had with this rev

Compiled and ran the latest, the escape works. EDITM.CM looks good but it only deals in stuff with line numbers as far as i can see, it loads unnumbered stuff but asks to re-sequence it to add line numbers. cannot find the way to get it to save and loose the line numbers. Cannot find a manual on it to learn its edit command minutia.

EDIT would be simpler to use but has a problem, to get data into it, need to use the A (append) command which needs the paper tape reader input device turned into something that accesses disk files.

I have some other locally written editors made for the Qasar stuff in office environments, these were full screen like MS wordpad I think I have a 6809 one for my CMI IIx

jhallen commented 1 year ago

I've been working on the 6809 exoriser simulator: "exor09", it's pretty much done but I haven't merged it in the main branch yet. If you want to try it, you need to clone the repo with "git clone" then checkout the exor09 branch with "git checkout exor09". Also I think you can download the .zip: you click on the pulldown box on the left which says "master", select "exor09" instead then download zip.

I think you can use "rese n" to delete the line numbers before saving in editm. I wrote some notes about the editors here:

https://github.com/jhallen/exorsim/blob/master/doc/mdos-intro.md

crestr1 commented 1 year ago

trying the 6809 under Cygwin exor09 MDOS terminal window wont backspace rubbing out characters in front of current cursor. Yeh, I know trivial: Sorry Joe, my favorite key nowadays, have finger muscle memory trouble on all the different keyboard sizes and layouts i use

crestr1 commented 1 year ago

an experimental execution under MDOS09: =PROMPROG.CM

PROM PROGRAMMER 3.12 COPYRIGHT MOTOROLA 1977 P QUIT

WHAT? P EXIT

Invalid opcode=$45 (page0) at $0002 3149486 A=0D B=00 X=0000 Y=205A U=300B S=2FE5 P=00 E--IN--C 0002: 45 Huh?A

3149487 A=0D B=00 X=0000 Y=205A U=300B S=2FE5 P=00 E--IN--C 0003: 00 20 NEG $20

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

crestr1 commented 1 year ago

The MECOPY command mystery ?

the attached 6800 mdos disk contains a copy program that i think i used to copy to EDOS disks (MECOPY.CM). which keeps telling me the freshly formatted empty disk also attached has no room. This may be from a very early MDOS which would have had to cater for customer transition from EDOS

6800 MDOS.zip

My trial of it suggests its default destination is :1 this may give some clues for improving your EDOS utility as there is a big difference in what EMCOPY recovers which it seems to get the history of the drive sorted out somehow and only recovers what appear to be the most recent files.

I seem to recollect something about EDOS using deleted data marks in the track sector FM encoding formatting (IBM FM soft sector encoding standard)

There is also a locally written version of EDIT called MEDIT this allowed command macros and offered a bigger memory capacity. but behaved as EDIT otherwise.

crestr1 commented 1 year ago

MDOS FORMAT.CM

this command just hangs up forever in Exorciser maybe in FLEX behaves differently. could this do something useful like making a totally empty disk DOSGEN could romp on or EDOS would consider usable

crestr1 commented 1 year ago

A QDOS 6809 disk some of the commands work RASM works RLOAD crashes

QDOS_6809.zip

jhallen commented 1 year ago

For the backspace: the problem is that the version of MDOS09 I have (the one from bitsavers) is not patched for a glass terminal, instead it's set up for a paper teletype. It looks like we need 6809 MDOS version 3.04 for proper backspace, this was in the MDOS 3.05 NEWS.SA file (for 6800):

 7.  With version 3.04, the delete (DEL=$7F) or backspace (BS=$08) keys
     will delete the last character from the input buffer and also
     erase it from a CRT screen as well by sending BS, SPACE, and BS
     characters.  Any command or utility not using the .KEYIN routine
     will not recognize the BS character to delete the last entered
     character from the CRT screen.  In this case, the DEL key must be
     used.

     A chain file (MDOSMODE.CF) has been provided to allow easy trans-
     formation between CRT and SCROLL mode handling of the delete
     character function.  List the chain file by entering
          =LIST MDOSMODE.CF;L       for printer
                 or
          =LIST MDOSMODE.CF         for console
     for instructions on how to execute it.

I fixed the PROMPROG problem (this was also broken in the 6800 version). I had not saved the exbug memory image correctly. I had forgotten that "EXIT" goes to EXBUG and you use "DISK" to exit back to MDOS. So now:

MDOS09  3.01
=PROMPROG

PROM PROGRAMMER   3.12
COPYRIGHT MOTOROLA 1977
P EXIT

SWI P-2289 X-0000 Y-0000 A-4E B-00 C-00 DP-00 U-F0B4 S-2FF1
*E ;P

P DISK
=
jhallen commented 1 year ago

QDOS: does this require a 6309 processor?

crestr1 commented 1 year ago

QDOS is 6809E, We looked at the 6309 but Hitachi kept changing its specifications and we did not like the software tools. Going 68000 was a better option after the CMI series III problems started and using os9 normalized.

crestr1 commented 1 year ago

G'day Joe: Xmas in July

I opened a never used virgin MDOS3.04 package to retrieve this

MDOS_3.04_Upgrade.zip

Now gimme a backspace that works :-)

jhallen commented 1 year ago

But no MDOSMODE.CF for it...

So I found the backspace handling code and made my own patch. Original code is:

1946: C1 7F               CMPB #$7f          Check for Delete
1948: 26 1F               BNE $1969            branch if not delete

194A: BD 1B8D             JSR $1b8d        check if at start, load ptr to b,a
194D: 27 DD               BEQ $192c         Loop, next char

194F: 4D                  TSTA           decrement b,a
1950: 26 01               BNE $1953
1952: 5A                  DECB 
1953: 4A                  DECA 

1954: AE 66               LDX 6,S      get pointer to struct
1956: E7 02               STB 2,X        save updated ptr
1958: A7 03               STA 3,X

195A: 7F 1BD9             CLR $1bd9    overflowed line flag?

195D: 3F                  SWI                  B,A -> X
195E: 25
195F: E6 84               LDB ,X               get old character
1961: BD 1AFC             JSR $1afc            print character b
1964: 24 C6               BCC $192c         Loop, next char
a 19651966: 7E 1AC7             JMP $1ac7      not sure...

1969: C1 18               CMPB #$18           Check for Ctrl-X

New code is:

1946: C1 7F               CMPB #$7f
1948: 26 1F               BNE $1969
194A: AE 66               LDX 6,S       get structure pointer
194C: EE 02               LDU 2,X       get cursor pointer
194E: 11A3 04             CMPU 4,X   at start of line?
1951: 27 D9               BEQ $192c    branch if yes
1953: 33 5F               LEAU -1,U     backup pointer
1955: EF 02               STU 2,X
1957: C6 08               LDB #$08      emit backspace/space/backspace
1959: BD 1AFC             JSR $1afc
195C: C6 20               LDB #$20
195E: BD 1AFC             JSR $1afc
1961: C6 08               LDB #$08
1963: 20 BF               BRA $1924      this code has the jsr $1afc sequence
1965: 12                  NOP 
1966: 12                  NOP 
1967: 12                  NOP 
1968: 12                  NOP 
1969: C1 18               CMPB #$18

Anyway, it's checked in. Backspace appears to work, but patches like this are risky. Maybe somebody jumps into the middle of it.

jhallen commented 1 year ago

One thing I vaguely remember is that MDOS09 does not use U or Y.. so I reworked the patch to avoid them. Also this preserves $1961 as a possible entry point.

1946: C1 7F               CMPB #$7f
1948: 26 1F               BNE $1969

194A: AE 66               LDX 6,S
194C: EC 02               LDD 2,X
194E: 10A3 04             CMPD 4,X
1951: 27 D9               BEQ $192c
1953: 83 0001             SUBD #$0001
1956: ED 02               STD 2,X
1958: 8D 09               BSR $1963
195A: C6 20               LDB #$20
195C: 8D 07               BSR $1965
195E: C6 08               LDB #$08
1960: 12                  NOP 
1961: 20 C1               BRA $1924
1963: C6 08               LDB #$08
1965: 7E 1AFC             JMP $1afc
1968: 12                  NOP 

1969: C1 18               CMPB #$18
196B: 26 06               BNE $1973
jhallen commented 1 year ago

I've merged exor09 into the master branch. Now when you type "make" it builds both the 6800 and the 6809 versions (exor and exor09).

crestr1 commented 1 year ago

Thanks for the backspace solution Joe mdos.c has a problem allowing 'put' duplicate names see below ROMQ.SA is there twice MDOS DISK PUT PROBLEM.zip

crestr1 commented 1 year ago

Is there a version of the old 6800 EDIT command (the one that needs ESC key) that will run in the 6809. for me this had advantages because the trivial changes I'm making are just one liners that do the lot using this since you fixed the ESC key problem.

jhallen commented 1 year ago

I've fixed the duplicate file problem: it was a case issue. If you used all uppercase, then deleting the original file failed. Anyway, should be fixed now.

I haven't found a 6809 version of the original EDIT. Also no RASM (6800 assembler) for 6809..

E in line editor mode is not so bad if you can get used to it: "E filename;S-N"

I put notes on how to use it at the end here: https://github.com/jhallen/exorsim/blob/master/doc/mdos-intro.md#mdos-editors

Something is definitely wrong in CRT (full screen) mode. The line at the top is wrong and the function key labels disappear when you insert a lot of text. Probably something is wrong with the EXORterm emulation.. it's on the list...

Also backspace doesn't work in E. There is a chain file to fix this, but maybe only for the 6800 version.. I'll look at this now.

jhallen commented 1 year ago

No luck with fixing backspace in E. Somehow the patch and versions of E we have do not match. It's annoying, I remember backspace working and also E always starting in "scroll" mode instead of "crt" mode, which I don't even see as an option. Maybe someone at the company I worked for patched it.

crestr1 commented 1 year ago

I'll find you the 6800 RASM for 6809 I will have it someplace in my recoveries or maybe in an unopened update packet

All installed ok under cygwin did a make and a make clean and a new make all seems ok Make is pretty verbose gave me a scare, used to just a few lines. CONGRATULATIONS Joe superb work