MiguelVis / te

Text editor for the CP/M operating system and related computers: Amstrad PCW, CPC, Kaypro, Spectrum...
GNU General Public License v2.0
84 stars 10 forks source link

Question about TE and 8080 CPU. #9

Open jayacotton opened 2 years ago

jayacotton commented 2 years ago

Hi Miguel:

I am interested to see if you have a version of this code that runs on at 8080 CPU. I am building up my IMSAI 8080 computer (again) and want to use your editor.

I have the code downloaded here on a unix machine, I could have a go at building it with z88dk. Do you know if that will have a chance of working? Is there a project already underway?

Tnx Jc

MiguelVis commented 2 years ago

I use MESCC (my Small-C variant) and the ZSM assembler to build TE.

There are small fragments of code in Z80 assembler embedded in the C source but nothing exotic, so they should be easily converted to 8080 code.

But I don't think the TE code could be compiled under z88dk or other C compiler without some changes here and there because is Small-C in the end, not ANSI, not even fully K&R.

But it could be adapted, of course.

jayacotton commented 2 years ago

z88dk has at zcc -m8080 flag that will generate z80 opcodes but avoids z80 specific syntax.

I think we would benefit from a z88dk Makefile that builds the editor and tools. I will be glad to have a go at that. Perhaps as soon as early december.

jayacotton commented 2 years ago

I have started on this project. I have a Makefile created, and have made a few small changes to the code. No joy yet on the compiling due to syntax bugs. The parser seems to be tripping on 'int cpm_ver'

te.c:117:1: error: Missing token, expecting = got i te.c:117:4: fatal error: Unknown symbol: int

This could be due to a parsing error up line.

missing semi color. That was my typo.

Looks like I will have to ANSI'fy' the code. I am using strict warnings and errors. So its finding stuff that is dodgy for modern C compilers (uses the LLVM parser). I think when this is finished, we need to test it with the current build batch files.

Making some progress, have not built a single .o file yet but I may get it to work by Sunday/Monday.

jayacotton commented 2 years ago

Hi Miguel:

I have completed the compile process, and it almost runs. There are a few bug to work through however.

I did have to change a bit of assembly code, no big deal there, and a lot of c code needed to be ANSI'fied z88dk uses the LLVM front end, it's very picky, which is desirable.

The main bugs I am working on now are console I/O in nature.

[image: image.png]

This is the screen after a:>te It did draw the ruler marks but it then erased the marks. Also return/esc etc don't seem to work, but (a-z) works.

JC

On Thu, Nov 25, 2021 at 11:47 AM MiguelVis @.***> wrote:

I use MESCC (my Small-C variant) and the ZSM assembler to build TE.

There are small fragments of code in Z80 assembler embedded in the C source but nothing exotic, so they should be easily converted to 8080 code.

But I don't think the TE code could be compiled under z88dk or other C compiler without some changes here and there because is Small-C in the end, not ANSI, not even fully K&R.

But it could be adapted, of course.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MiguelVis/te/issues/9#issuecomment-979442784, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIC7NQQHKN6OGR6OZYX5EPDUN2HEVANCNFSM5GA6ZS5Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jayacotton commented 2 years ago

Is it required to run recf PATCH to get a running system ? Is there a way to avoid that ?

tnx jc

On Tue, Jan 11, 2022 at 4:26 PM Jay Cotton @.***> wrote:

Hi Miguel:

I have completed the compile process, and it almost runs. There are a few bug to work through however.

I did have to change a bit of assembly code, no big deal there, and a lot of c code needed to be ANSI'fied z88dk uses the LLVM front end, it's very picky, which is desirable.

The main bugs I am working on now are console I/O in nature.

[image: image.png]

This is the screen after a:>te It did draw the ruler marks but it then erased the marks. Also return/esc etc don't seem to work, but (a-z) works.

JC

On Thu, Nov 25, 2021 at 11:47 AM MiguelVis @.***> wrote:

I use MESCC (my Small-C variant) and the ZSM assembler to build TE.

There are small fragments of code in Z80 assembler embedded in the C source but nothing exotic, so they should be easily converted to 8080 code.

But I don't think the TE code could be compiled under z88dk or other C compiler without some changes here and there because is Small-C in the end, not ANSI, not even fully K&R.

But it could be adapted, of course.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MiguelVis/te/issues/9#issuecomment-979442784, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIC7NQQHKN6OGR6OZYX5EPDUN2HEVANCNFSM5GA6ZS5Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jayacotton commented 2 years ago

Hi Miguel:

Made a bunch of progress today. I have the stock (as delivered) tecf program working with my 8080 version of the te_ansi.c et.al.

This much improves the operation of te. Still not processing control characters, ESC and CR (and much else) get echoed to the screen as a space, therefore ESC will not take me to a menu. I suspect te_keys.c still but can't nail it down yet.

I'm attempting to determine if te_keys and te_keys_ex are filled in, this seems to be a major test for te_keys.c

jc

On Tue, Jan 11, 2022 at 4:45 PM Jay Cotton @.***> wrote:

Is it required to run recf PATCH to get a running system ? Is there a way to avoid that ?

tnx jc

On Tue, Jan 11, 2022 at 4:26 PM Jay Cotton @.***> wrote:

Hi Miguel:

I have completed the compile process, and it almost runs. There are a few bug to work through however.

I did have to change a bit of assembly code, no big deal there, and a lot of c code needed to be ANSI'fied z88dk uses the LLVM front end, it's very picky, which is desirable.

The main bugs I am working on now are console I/O in nature.

[image: image.png]

This is the screen after a:>te It did draw the ruler marks but it then erased the marks. Also return/esc etc don't seem to work, but (a-z) works.

JC

On Thu, Nov 25, 2021 at 11:47 AM MiguelVis @.***> wrote:

I use MESCC (my Small-C variant) and the ZSM assembler to build TE.

There are small fragments of code in Z80 assembler embedded in the C source but nothing exotic, so they should be easily converted to 8080 code.

But I don't think the TE code could be compiled under z88dk or other C compiler without some changes here and there because is Small-C in the end, not ANSI, not even fully K&R.

But it could be adapted, of course.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MiguelVis/te/issues/9#issuecomment-979442784, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIC7NQQHKN6OGR6OZYX5EPDUN2HEVANCNFSM5GA6ZS5Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jayacotton commented 2 years ago

At this time, the TE_ANSI editor is running for 8080/z80. I am holding off the total commitment until I can test the code on my 8080, its about 10 hours drive south.

I have a github repo for my work. I don't know is anyone can see it, I made it a private project. https://github.com/jayacotton/miguels-vi

So, the work was to ansify the code and clean out z80isms in the assembly code. There where some issues with portability that I had to fix up. Its now building clean.

This is only the one editor.

I created a Makefile that builds the code, the patch 'i.e. tecf' is running on my build machine with vcpm, a tool that comes from https://github.com/durgadas311/cpnet-z80 project.

ttpilot commented 2 years ago

At this time, the TE_ANSI editor is running for 8080/z80. I am holding off the total commitment until I can test the code on my 8080, its about 10 hours drive south.

I have a github repo for my work. I don't know is anyone can see it, I made it a private project. https://github.com/jayacotton/miguels-vi

So, the work was to ansify the code and clean out z80isms in the assembly code. There where some issues with portability that I had to fix up. Its now building clean.

This is only the one editor.

I created a Makefile that builds the code, the patch 'i.e. tecf' is running on my build machine with vcpm, a tool that comes from https://github.com/durgadas311/cpnet-z80 project.

Have you made the 8080 version of te available yet? I'd love to run it on my Altair. I don't care much for the other editors I've tried

jayacotton commented 2 years ago

Its on github, but Miguel has not given an o.k. to make it public.

I guess I could send you the .com files.

Let me know what you want to do.

tnx jc

On Fri, Apr 29, 2022 at 10:24 AM ttpilot @.***> wrote:

At this time, the TE_ANSI editor is running for 8080/z80. I am holding off the total commitment until I can test the code on my 8080, its about 10 hours drive south.

I have a github repo for my work. I don't know is anyone can see it, I made it a private project. https://github.com/jayacotton/miguels-vi

So, the work was to ansify the code and clean out z80isms in the assembly code. There where some issues with portability that I had to fix up. Its now building clean.

This is only the one editor.

I created a Makefile that builds the code, the patch 'i.e. tecf' is running on my build machine with vcpm, a tool that comes from https://github.com/durgadas311/cpnet-z80 project.

Have you made the 8080 version of te available yet? I'd love to run it on my Altair. I don't care much for the other editors I've tried

— Reply to this email directly, view it on GitHub https://github.com/MiguelVis/te/issues/9#issuecomment-1113550605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIC7NQVUV7DLMRKDH5AHKIDVHQLNVANCNFSM5GA6ZS5Q . You are receiving this because you authored the thread.Message ID: @.***>

ttpilot commented 2 years ago

I'd like to try them out. Think of me as a beta tester lol. I thought about going through Miguel's source code myself, but I haven't done any CP/M programming since the early 80s, and assembly since before that!

jayacotton commented 2 years ago

O.k. find https://github.com/jayacotton/te_bin_8080/tree/master. The binaries are there. There are a lot of other projects in there that might be interesting.

jc

On Fri, Apr 29, 2022 at 9:26 PM ttpilot @.***> wrote:

I'd like to try them out. Think of me as a beta tester lol. I thought about going through Miguel's source code myself, but I haven't done any CP/M programming since the early 80s, and assembly since before that!

— Reply to this email directly, view it on GitHub https://github.com/MiguelVis/te/issues/9#issuecomment-1113912816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIC7NQWDZTAERODEWIM3QULVHSY7TANCNFSM5GA6ZS5Q . You are receiving this because you authored the thread.Message ID: @.***>

ttpilot commented 2 years ago

I'm using te on an Altair 8800c with TeraTerm as a VT100 terminal. Te seems to load okay and shows the editing screeh, but it doesn't respond to pressing ESC to get a menu. I just get a '?' character on the screen.. In fact pressing any control key or any non-printing key just gets me a '?'. I have to reboot to to get out of it. The teconf.com utility seems to load but not start. Have to reboot for that too

jayacotton commented 2 years ago

You will need to configure TE.COM using TECF.COM and the config file I posted. The instructions are on Miguel's TE project page. TECF.COM modifies the TE.COM file and sets it up for ANSI mode terminals (TeraTerm etc).

If that doesn't work, I can post a configured version of the code.

jc

On Wed, May 4, 2022 at 3:24 PM ttpilot @.***> wrote:

I'm using te on an Altair 8800c with TeraTerm as a VT100 terminal. Te seems to load okay and shows the editing screeh, but it doesn't respond to pressing ESC to get a menu. I just get a '?' character on the screen.. In fact pressing any control key or any non-printing key just gets me a '?'. I have to reboot to to get out of it. The teconf.com utility seems to load but not start. Have to reboot for that too

— Reply to this email directly, view it on GitHub https://github.com/MiguelVis/te/issues/9#issuecomment-1117990099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIC7NQRTX7XWAZZLS6X3PP3VIL2KZANCNFSM5GA6ZS5Q . You are receiving this because you authored the thread.Message ID: @.***>

jayacotton commented 2 years ago

I pushed a pre patched version of the binary. Find TE_ANSI.COM

it should run on 8080 for you.

jc

On Thu, May 5, 2022 at 12:10 AM Jay Cotton @.***> wrote:

You will need to configure TE.COM using TECF.COM and the config file I posted. The instructions are on Miguel's TE project page. TECF.COM modifies the TE.COM file and sets it up for ANSI mode terminals (TeraTerm etc).

If that doesn't work, I can post a configured version of the code.

jc

On Wed, May 4, 2022 at 3:24 PM ttpilot @.***> wrote:

I'm using te on an Altair 8800c with TeraTerm as a VT100 terminal. Te seems to load okay and shows the editing screeh, but it doesn't respond to pressing ESC to get a menu. I just get a '?' character on the screen.. In fact pressing any control key or any non-printing key just gets me a '?'. I have to reboot to to get out of it. The teconf.com utility seems to load but not start. Have to reboot for that too

— Reply to this email directly, view it on GitHub https://github.com/MiguelVis/te/issues/9#issuecomment-1117990099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIC7NQRTX7XWAZZLS6X3PP3VIL2KZANCNFSM5GA6ZS5Q . You are receiving this because you authored the thread.Message ID: @.***>

ttpilot commented 2 years ago

Thanks. I'll give it a try

ttpilot commented 2 years ago

I tried it out. It sets up correctly on the screen, and typing text works fine. Any text I 'Save' or 'save As' appears to write out to the disk, but the files are always empty. If I load a previous text file that has known content, a 'Save' or 'save As' also results in an empty file

ttpilot commented 2 years ago

Never mind. Disk was full and produced no error message. Te is saving normally. Thanks much

jayacotton commented 2 years ago

Cool. Keep me posted on any other issues.

I am so used to VI that I really struggle with the control codes. Been thinking about a mode to make the arrow keys and page up/down work.

jc

On Sat, May 7, 2022 at 1:39 PM ttpilot @.***> wrote:

Never mind. Disk was full and produced no error message. Te is saving normally. Thanks much

— Reply to this email directly, view it on GitHub https://github.com/MiguelVis/te/issues/9#issuecomment-1120285934, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIC7NQVMJUUGIUYVGTFKAFTVI3IITANCNFSM5GA6ZS5Q . You are receiving this because you authored the thread.Message ID: @.***>

ttpilot commented 2 years ago

Understood. I thought a bit about that today. It's been too long since I used a lot of control-key codes.

MiguelVis commented 2 years ago

Hi @jayacotton

Sorry about this sooooo late reply, but paid programming work was winning the last weeks and months over my hobby projects.

TE is released under the GNU license v2, so it's freeware.

In fact, you MUST publish the sources under the GPL if you distribute the binaries.

So add your copyright to your partial work over my original TE sources and just do it.

I have no problem publishing the sources of your / my work here at my GitHub repositories as already did for the RC2014 computer variants from Ladislau Szilagyi - ie:

https://github.com/MiguelVis/te-rc2014-128kb

MiguelVis commented 2 years ago

Cool. Keep me posted on any other issues. I am so used to VI that I really struggle with the control codes. Been thinking about a mode to make the arrow keys and page up/down work. jc

Which are the key codes emitted from your keyboard?

Maybe I can help on this.

jayacotton commented 2 years ago

Hi Miguel:

Thanks for your reply, and your good work.

I will remove the private flag from my repo. BTW: It is a partial port, only interested in the TE_ANSI version of the code. I have this running on my IMSAI 8080 computer now. Works very well there, as always space is an issue.

WRT: key board characters. Don't really know yet. This one is a Logitech, but its filetered by tereterm or absolute ansi terminal mode. I should take some time today/tomorrow to document the keycodes of interest. I can let you know in a day or to.

tnx jc

On Sun, May 8, 2022 at 10:06 AM MiguelVis @.***> wrote:

Cool. Keep me posted on any other issues. I am so used to VI that I really struggle with the control codes. Been thinking about a mode to make the arrow keys and page up/down work. jc

Which are the key codes emitted from your keyboard?

Maybe I can help on this.

— Reply to this email directly, view it on GitHub https://github.com/MiguelVis/te/issues/9#issuecomment-1120453642, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIC7NQS2OMDA5DTV5AEWZGLVI7X7TANCNFSM5GA6ZS5Q . You are receiving this because you were mentioned.Message ID: @.***>