Open main menu

CDOT Wiki β

Changes

6502 Emulator

793 bytes added, 16:02, 2 November 2022
Basic Controls
The Speed slider lets you adjust the speed of the emulator from about 1% of native 6502 performance (left) to roughly full native speed (right). Setting the speed slider to a lower setting can be useful for debugging and for viewing the progress of operations on the displays.
There are also controls to Save and Load the text area to/from local storage on the computer on which it is running (as a download/upload); this works nicely with a local github git repository(or clone).
== Assembler Capabilities ==
* "dcb" directive: the Define Constant Byte (dcb) directive will cause the assembler to place individual byte values into memory. These byte values may be in hexadecimal prefixed with $, decimal with no prefix, or single printable non-space characters quoted with double quotes.
=== High and Low Label Bytes ===
* the The low byte of the label X can be accessed as &lt;X and the high byte can be accessed as &gt;X. For example, this code will load the low byte of the label "start" into the A register: <code>LDA #&lt;START</code> - note that this only works with labels, and not with macros.* You can use labels and origin assignment together to get a label for any address in the system. For example, to get a label pointing to the first byte of the character display, you could place this at the end of your program:  *=$f000 DISPLAY: You could then create a pointer to that address at $0027 with this code:  LDA #<DISPLAY STA $27 LDA #>DISPLAY STA $28
=== Comments ===
== Using the Monitor ==
Selecting the Monitor checkbox will display the specified region of memory as code is executed. For example, specifying a start of $00 and a length of $100 will display the entire zero page. Once enabled, the monitor may not display until the code is executed (via Run button).
== Turning the Text Screen On/Off ==
The checkbox labeled "Text Screen" can be used to hide the character display to free up more screen space for editing code. Note also that the character display can be used for additional program memory (whether the display is enabled or not) when it's not required for output.
== Peripherals and Memory Map ==
|$06-$EF||$0600-$EFFF||Program Memory|| ||RAM available for program use. By default, programs will be assembled starting at memory location $0600. This space is available for software and data. The arrangement and use of this memory is left to the programmer.
|-
|$F0-FC||$F000-$FCFF||Character Display|| ||80 row colummn x 25 line character display for text messages -- See description below.
|-
|$FD||$FD00-$FDFF||Reserved|| ||This memory range is reserved for future ROM expansion.
** $e: Light blue
** $f: Light grey
* an 80x25 character display at '''$f000-$fcff''', with one byte per pixelcharacter. Printable ASCII characters will be displayed. If the high-order bit is set, the character will be shown in <span style="background: black; color: white;">&nbsp;reverse video&nbsp;</span>.
* a read-only ROM chip is present at '''$fe00-$ffff'''; see below for details.
== ROM Routines ==
These Many 6502 personal/home computers had the operating system installed in read-only memory (ROM) chips. The emulator has a small ROM chip with these simple input/output (I/O) routines are defined in ROM
* SCINIT $ff81 - Initialize and clear the character display
* CHRIN $ffcf - Input one character from keyboard (returns A (that is, the return value will be placed in the Accumulator register))