[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  Electronics
. -> [Folder]  G-Pascal
. . -> [Subject]  Separate Editor/Assembler/Pascal

Separate Editor/Assembler/Pascal

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page


Posted by Robbbates   (6 posts)  [Biography] bio
Date Mon 29 Apr 2024 08:27 PM (UTC)

Amended on Mon 29 Apr 2024 08:30 PM (UTC) by Robbbates

Message
Hi Nick,

This looks very promising. I've been scouring the net for a 6502 text editor and have no luck except some dusty 1977 era items which look nigh impossible to find, much less re-compile with the latest assemblers.

I was wondering if you had thought of separating the three modules into stand alone programs. I realize you can opt out of the assembler and pascal during compile, but I don't know how much extra baggage there will be. As well as the additional includes. e.g. hardware, i2c, spi, lcd, etc. I'm planning on trimming them down to just the essentials anyway.

I would like to try out pascal, but don't think I'd want to include it in my already packed ROM. The editor for sure and very likely the assembler.

Also, Ben has added a 6551 UART chip to his design, but your code is relying on bit banging the VIA. Have you thought of updating that as well?

Lastly, I use ca65 as my main assembler. I'm going to try to scrub your code to change all the Vasm stuff to ca65 dialect. Should be a fun exercise!

Thoughts?

Thanks,
Robb
[Go to top] top

Posted by Nick Gammon   Australia  (23,000 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Tue 30 Apr 2024 06:56 AM (UTC)
Message
You can omit the Pascal, Assembler and LCD stuff with existing conditional compiles. I didn't think to do the SPI and I2C, but if you omit the above you can probably drop those files as well with minimal impact.

Quote:

Also, Ben has added a 6551 UART chip to his design, but your code is relying on bit banging the VIA. Have you thought of updating that as well?


Yeah, I looked at that, but thought the difference would be minimal. Already you have an interrupt on an incoming byte, and the time saved by having the UART is not much. Plus, I don't think you will get much extra baud rate, if any, because you are limited to how fast you can process the bytes and shove them in memory anyway. It's another chip, more wiring, and not much benefit.

You are, of course, welcome to incorporate his code (I think it is on his YouTube page about how he did that).

The other thing you could do is add a bit more of a "monitor" program as Ben also described, although I think I have most of that covered, with the shell "Memory", "Poke", "JSR" and "JMP" commands.

It's a fun project, enjoy making modifications!

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Robbbates   (6 posts)  [Biography] bio
Date Reply #2 on Tue 30 Apr 2024 12:49 PM (UTC)
Message
I've been chipping away at your code.

I got a crude version working. Ugly formatting on my 40 column homebrew. Only linefeeds and no carriage returns. But it loads, saves, assembles and pascals.

I'm currently stripping down the editor to make it entirely stand alone. No assembler, pascal or any monitor functionality, as I have that elsewhere.

Just a text editor and nothing else.

Next I'll *try* to make the Assembler and Pascal stand alone as well. Either the Assembler/Pascal will call the editor or the other way around. We'll see.
[Go to top] top

Posted by Nick Gammon   Australia  (23,000 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Tue 30 Apr 2024 08:40 PM (UTC)
Message
As for the carriage returns (I didn't do them because I was using a terminal program that would translate \n as carriage return and newline) you could modify COUT in utilities.inc to also output a 0x0D whenever it saw a 0x0A.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Robbbates   (6 posts)  [Biography] bio
Date Reply #4 on Tue 30 Apr 2024 09:58 PM (UTC)
Message
Great timing.

I did a wholesale find/swap with CR and NL. A few places where it mattered, but I think I found them. i.e in the GETLINE routine and the editor when you hit enter to go to the next line of code.

I just got it up and working like SECONDS before receiving this post. It compiled the adventure game without errors. Running it threw some problems. But I'll figure it out.

https://youtu.be/1NQ1Z0Kf53U

Thanks,
Robb
[Go to top] top

Posted by Nick Gammon   Australia  (23,000 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Wed 01 May 2024 08:04 AM (UTC)
Message
You could have just changed:


NL               =  $0A   ; newline


to:



NL               =  $0D   ; newline


However that would not give you CR+NL for line endings.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


253 views.

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]