Jump to content

Assembly Environment V0.8 released


Recommended Posts

The Assembly Environment (V0.8) is released, you can get the beta here: https://sites.google.com/view/x16asmenv/home

I've also got a video about this release: https://youtu.be/adohtDGGPbE

This release is now the first to be considered "beta", since I believe it to be feature complete (based on original plans). From here on out I'll be fixing bugs and making it rom enabled.

 

Comments and bugs welcome!

  • Like 11
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
On 11/15/2020 at 12:54 AM, mjallison42 said:

That is a UI limitation right now. While in ASSY mode, select the address you want to insert at, then insert instruction. 

This is useful whenever you are attempting an edit outside of the program region. 

I need to think about append some more.

I had a C64 editor that handled insert by opening up 256 bytes of space and when you were done, you had another command to close it up again. It filled the space with nulls  That approach was faster while typing than autoinsert because it was always in overwrite mode.

It seems like a block insert space operation could be designed that also automatically acts as a program region extender, since a block insert would have to grow the program region in any event, to make room for the block insert ... so as long as it works for a "trailing region" of code of zero bytes, it would do double duty for adding space to the end of the program region.

Link to comment
Share on other sites

11 hours ago, BruceMcF said:

I had a C64 editor that handled insert by opening up 256 bytes of space and when you were done, you had another command to close it up again. It filled the space with nulls  That approach was faster while typing than autoinsert because it was always in overwrite mode.

It seems like a block insert space operation could be designed that also automatically acts as a program region extender, since a block insert would have to grow the program region in any event, to make room for the block insert ... so as long as it works for a "trailing region" of code of zero bytes, it would do double duty for adding space to the end of the program region.

This makes a lot of sense for assembly code, especially since the 6502 is so page-sensitive. Although filling the space with NOPs would make more sense than nulls. 

For a standard text editor, the better choice is to copy the text from the main document to a line buffer. In the line buffer, your edit is never more than one line of text allows (let's just say 255 characters). The 8Mhz 6502 is plenty fast for inserting text in a 255 character block. 

Then, when you press return, press an arrow key,  or exit edit mode, the current line is copied back to the main text, with adjustments made for the length of the line, compared to the original. 

  • Like 1
Link to comment
Share on other sites

On 10/5/2020 at 2:43 PM, mjallison42 said:

The Assembly Environment (V0.8) is released, you can get the beta here: https://sites.google.com/view/x16asmenv/home

I've also got a video about this release: https://youtu.be/adohtDGGPbE

This release is now the first to be considered "beta", since I believe it to be feature complete (based on original plans). From here on out I'll be fixing bugs and making it rom enabled.

 

Comments and bugs welcome!

Hi, Mike.

I've already run into problems trying to run the emulator... if you look at the attached file below (for some reason, I can't paste images into the forum now), the filenames are using graphic symbols. When I try to load them with the LOAD command, I get a file not found. 

The interesting thing is that it actually loads if I type in the load command manually, typing the keys that match the graphic characters. (ie: LOAD "X16SA")

I fixed my local copy, but it would help if future versions of the IMG have the filenames in upper-case only format. 
 

x16emu case.PNG

Edited by TomXP411
Link to comment
Share on other sites

Also, in assembly mode, if I cursor down to the end of a screenful of text, the text doesn't scroll when I hit the bottom. Instead, the highlight disappears off the bottom of the screen. 

I would expect the screen to scroll, perhaps when I'm 5 or so rows above the bottom, so I can "look ahead" of where the edit cursor is currently positioned. 

It might also be nice to have a data mode as a part of the labeling system. When I move to zero page to look at the psuedo-registers, the system tries to disassemble the data there. It gets really confusing as I scroll through those values. Maybe when creating a label, you can offer a way to designate the label as a code, data space, with a couple of type settings (PETSCII and HEX at the very least).  

I see you do have a .CSTR directive, which seems to work well enough when inside the program area... but not all (or even most) labels will be inside the user-created program. Many will be elsewhere in the system: KERNAL calls, I/O addresses, and zero-page address. Being able to inspect them as the proper data type would really help.

Link to comment
Share on other sites

  • 2 weeks later...

Use the "view mode" to examine defined labels. This shows all defined labels , even outside of the program region. It is missing the ability to define a label outside of the program region. 

As for examining the 16 bit registers, the debug display shows those. You can not use assembly mode to look at those locations, you should use "view mode, memory" if you want to see the raw dump. 

 

Link to comment
Share on other sites

  • 2 months later...

The Assembly Environment looks great!  I don't know if this is a bug, but I loaded x16skel.prg and then Watch->CStr.  I ended up leaving it blank (because I wanted to back out of the prompt) and hit return, and then it starts running and eventually returns an "ERROR: 65C02 CPU REQUIRED!"

I wasn't doing anything serious.  Just poking around.  BTW, your video on this was great!  Easy to follow the example.  Worked fine!

Link to comment
Share on other sites

On 12/19/2020 at 1:45 PM, mjallison42 said:

Use the "view mode" to examine defined labels. This shows all defined labels , even outside of the program region. It is missing the ability to define a label outside of the program region.

 

Is defining a label/symbol outside of the program region something that will be added?  I see that F2 (View) followed by F3 (SYMB) shows all of the symbols.  It would be a nice feature to be able to define additional ones (maybe there already is and I just missed it?)

Also, there are times when I'm backing out of something and I hit F8 too many times and I end up exiting the program.  Maybe make EXIT F12 instead of F8 - so that it is all the way at the end of the keyboard? ( and leave F8 as the BACK key for everything else, and have no other function assigned to F12?)

Link to comment
Share on other sites

Ah okay, a quick test shows that ESC and Ctrl-C both interrupt a Basic program, so it's probably mapped to the Stop key in the emulator. Using the WASD keyboard, RUN/STOP, 40/80 (and potentially RESTORE, but how do I check that?) don't work as expected. I suspect there's a reason for it, but is it a good reason? I imagine it might be a pain to get Scroll Lock key presses consistently on all supported platforms, or something like that?

Link to comment
Share on other sites

Hello.

I'm by no means an expert on PS/2 scan codes.

According to tables available on line, for instance here https://techdocs.altium.com/display/FPGA/PS2+Keyboard+Scan+Codes, it seems that the only key with prefix $E1 is the Pause/Break key.

The Esc key make code is $76.

Looking at the Kernal source at kernal/drivers/x16/ps2kbd.s

  • Keyboard scan routine starts at line 125
  • At line 132 it branches to line 177 (label: down_ext) if the PS/2 prefix is not 0
  • If the PS/2 prefix is $E1 we got the Pause/Break key
  • I have no working Pause key on my Mac, so I cannot test what happens. However, it seems that the X register is loaded with value #6 on line 205, which is moved to A register on line 208 and divided by 2 on line 209 before sent to the keyboard buffer.  6 divided by 2 is the code for the Esc key. So I would guess that Esc and Pause/Break is ending up doing the same. 

The Esc key breaks Basic code.

In assembly programs, I would say that the Esc key doesn't have any function, other than what you tell it to.

Link to comment
Share on other sites

  • 2 weeks later...
  • Administrators

I'll probably be doing an update on the X16 in a month or two.  It might be good to show this assembly environment off again.  Has anyone written anything in the environment that would make for a good demonstration?

  • Like 6
Link to comment
Share on other sites

Hi David,

I haven't heard of anyone doing anything beyond "Hello World". I may be able to think up something a bit more meaty.

I wonder if any of the creative coders on the forum might be up to this challenge? A coder writing a small flashy demo can get 15 seconds of fame and help provide valuable feedback for the project.

I'll also follow up with an email on some related issues.

 

Cheers,

Mike A

 

  • Like 4
Link to comment
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.

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.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use