Jump to content

Assembly Interface

Posted by walker7, 13 November 2017 · 283 views

assembly computer 8-bit 16-bit 6502 Motorola 68000 Z80 65C02 NES Sega Genesis

The interface for a good assembler is just like a text editor, with extra features added to make assembly easier.
Take a look at this simulated screenshot, inspired by the Apple ][.  This is a multiply routine for the Motorola 68000:
Posted Image
There are several things that would make this more of an assembler than a word processor:

  • Under the label "Multiply," there is a blue line stretching across the screen.  You could toggle this on or off.  Under this line can be shown information about the subroutine (e.g. input/output).
  • Each line of code is indented automatically.
  • The local labels have a period before them, and are not indented.
  • There is a red "+" before the label.  Clicking it changes it to a "-" and makes the code disappear.  You could click the "-" to make the code reappear.  Whether the code is folded or not, it's compiled when requested.
  • When compiled, the branches with the ".s" extension will resolve to a ".b" (8-bit) or ".w" (16-bit) displacement, whichever is the shortest possible.  If the extension is left off, assume it to be ".s".   That way, you don't have to figure it out yourself.
In this example, the screen is 480x360 pixels.  Characters are 7 pixels across and 8 pixels down, just like on the Apple ][.  In system RAM, this could be handled with one table telling which ASCII character to show (one byte per character), and another table to tell the background/foreground colors for each cell (in each byte, there are 4 bits for background color and 4 bits for background color).
By default, the line under labels is enabled, tab width is 8 characters, lines after labels and code automatically indent, and code is not folded.  When a mouse is used, the character that the mouse is pointing to is shown in a different color (for example, in the above screen, it would be shown as a white cell with a blue character).
Characters would be stored as ASCII.  The blue underline is toggled on/off with a control byte, and the tab width is also controlled using a certain byte.
You could use any programming language you want, be it 6502, 68K, Z80, BASIC, etc.  Regarding the keyboard, there could be additional keys based on what programming language you use.  In addition to a regular ASCII keyboard, there could be attachments you could just snap on.  For example, a 6502 keyboard attachment might have buttons labeled "LDA," "STA," "CLC," "SEC," "ADC," and "SBC."
Next, I'll mention some enhancements you could make to the screen.

August 2018

121314151617 18

Recent Entries

Recent Comments