A Tandy Color Computer 1, 2, and 3 assembler written in Python

Overview

CoCo Assembler and File Utility

GitHub Workflow Status Codecov Dependencies License: MIT

Table of Contents

  1. What is it?
  2. Requirements
  3. License
  4. Installing
  5. Assembler
    1. Assembler Usage
      1. Input File Format
      2. Print Symbol Table
      3. Print Assembled Statements
      4. Save to Binary File
      5. Save to Cassette File
    2. Mnemonic Table
      1. Mnemonics
      2. Pseudo Operations
    3. Operands
    4. Addressing Modes
  6. File Utility
    1. Listing Files
    2. Extracting to Binary File
    3. Extracting to Cassette File
  7. Common Examples
    1. Appending to a Cassette
    2. Listing Files in an Image
    3. Extracting Binary Files from Cassette Images
    4. Extracting Binary Files from Disk Images

What is it?

This project is an assembler for the Tandy Color Computer 1, 2 and 3 written in Python 3.6. It is intended to be statement compatible with any code written for the EDTASM+ assembler. The assembler is capable of taking EDTASM+ assembly language code and translating it into machine code for the Color Computer 1, 2, and 3. Current support is for 6809 CPU instructions, but future enhancements will add 6309 instructions.

This project also includes a general purpose file utility, used mainly for manipulating CAS, DSK, and WAV files.

Requirements

In order to run the assembler, you will need Python 3.6 or greater. If you prefer to clone the repository, you will need Git (if you don't want to install Git, then check the Releases section for the newest release of the package that you can download).

License

This project makes use of an MIT style license. Please see the file called LICENSE for more information.

Installing

To install the source files, download the latest release from the Releases section of the repository and unzip the contents in a directory of your choice. Or, clone the repository in the directory of your choice with:

git clone https://github.com/craigthomas/CoCoAssembler.git

Next, you will need to install the required packages for the file:

pip install -r requirements.txt

Assembler

The assembler is contained in a file called assmbler.py and can be invoked with:

python assembler.py

In general, the assembler recognizes EDTASM+ mnemonics, along with a few other somewhat standardized mnemonics to make program compilation easier. By default, the assembler assumes it is assembling statements in 6809 machine code. Future releases will include a 6309 extension.

Assembler Usage

To run the assembler:

python assembler.py input_file

This will assemble the instructions found in file input_file and will generate the associated Color Computer machine instructions in binary format. You will need to save the assembled contents to a file to be useful. There are several switches that are available:

  • --print - prints out the assembled statements
  • --symbols - prints out the symbol table
  • --bin_file - save assembled contents to a binary file
  • --cas_file - save assembled contents to a cassette file
  • --dsk_file - save assembled contents to a virtual disk file
  • --name - saves the program with the specified name on a cassette or virtual disk file

Input File Format

The input file needs to follow the format below:

LABEL    MNEMONIC    OPERANDS    COMMENT

Where:

  • LABEL is a 10 character label for the statement
  • MNEMONIC is a 6809 operation mnemonic from the Mnemonic Table below
  • OPERANDS are registers, values, expressions, or labels as described in the Operands section
  • COMMENT is a 40 character comment describing the statement (must have a ; preceding it)

An example file:

; Print HELLO WORLD on the screen
            NAM     HELLO           ; Name of the program
CHROUT      EQU     $A30A           ; Location of CHROUT routine
POLCAT      EQU     $A000           ; Location of POLCAT routine
            ORG     $0E00           ; Originate at $0E00
START       JSR     $A928           ; Clear the screen
            LDX     #MESSAGE        ; Load X index with start of message
PRINT       LDA     ,X+             ; Load next character of message
            CMPA    #0              ; Check for null terminator
            BEQ     FINISH          ; Done printing, wait for keypress
            JSR     CHROUT          ; Print out the character
            BRA     PRINT           ; Print next char
MESSAGE     FCC     "HELLO WORLD"
            FDB     $0              ; Null terminator
FINISH      JSR     [POLCAT]        ; Read keyboard
            BEQ     FINISH          ; No key pressed, wait for keypress
            JMP     $A027           ; Restart BASIC
            END     START

Print Symbol Table

To print the symbol table that is generated during assembly, use the --symbols switch:

python assembler.py test.asm --symbols

Which will have the following output:

-- Symbol Table --
$A30A CHROUT
$A000 POLCAT
$0E00 START
$0E06 PRINT
$0E11 MESSAGE
$0E1E FINISH

The first column of output is the hex value of the symbol, the second columns is the symbol name itself.

Print Assembled Statements

To print out the assembled version of the program, use the --print switch:

python assembler.py test.asm --print

Which will have the following output:

-- Assembled Statements --
$0000                         NAM HELLO         ; Name of the program
$0000                CHROUT   EQU $A30A         ; Location of CHROUT routine
$0000                POLCAT   EQU $A000         ; Location of POLCAT routine
$0E00                         ORG $0E00         ; Originate at $0E00
$0E00 BDA928          START   JSR $A928         ; Clear the screen
$0E03 8E0E11                  LDX #MESSAGE      ; Load X index with start of message
$0E06 A680            PRINT   LDA ,X+           ; Load next character of message
$0E08 8100                   CMPA #0            ; Check for null terminator
$0E0A 2712                    BEQ FINISH        ; Done printing, wait for keypress
$0E0C BDA30A                  JSR CHROUT        ; Print out the character
$0E0F 20F5                    BRA PRINT         ; Print next char
$0E11 48454C4C4F    MESSAGE   FCC "HELLO WORLD" ;
$0E1C 0000                    FDB $0            ; Null terminator
$0E1E AD9FA000       FINISH   JSR [POLCAT]      ; Read keyboard
$0E22 27FA                    BEQ FINISH        ; No key pressed, wait for keypress
$0E24 7EA027                  JMP $A027         ; Restart BASIC
$0E27                         END START         ;

A single line of output is composed of 6 columns:

Line:   $0E00 BDA928          START   JSR $A928         ; Clear the screen
        ----- ------          -----   --- -----         ------------------
Column:   1     2               3      4    5                   6

The columns are as follows:

  1. The offset in hex where the statement occurs ($0E00).
  2. The machine code generated and truncated to 10 hex characters (BDA928).
  3. The user-supplied label for the statement (START).
  4. The instruction mnemonic (JSR).
  5. Operands that the instruction processes ($A928).
  6. The comment string (Clear the screen).

Save to Binary File

To save the assembled contents to a binary file, use the --bin_file switch:

python assembler.py test.asm --bin_file test.bin

The assembled program will be saved to the file test.bin. Note that this file may not be useful on its own, as it does not have any meta information about where the file should be loaded in memory (pseudo operations ORG and NAM will not have any effect on the assembled file).

NOTE: If the file test.bin exists, it will be erased and overwritten.

Save to Cassette File

To save the assembled contents to a cassette file, use the --cas_file switch:

python assembler.py test.asm --cas_file test.cas

This will assemble the program and save it to a cassette file called test.cas. The source code must include the NAM mnemonic to name the program (e.g. NAM myprog), or the --name switch must be used on the command line (e.g. --name myprog). The program name on the cassette file will be myprog.

NOTE: if the file test.cas exists, assembly will stop and the file will not be overwritten. If you wish to add the program to test.cas, you must specify the --append flag during compilation:

python assembler.py test.asm --cas_file test.cas --append

This will add the file to the test.cas file as an additional binary within the cassette. To load from the cassette file using BASIC's CLOADM command would be done as follows

CLOADM"MYPROG"

Mnemonic Table

Below are the mnemonics that are accepted by the assembler (these mnemonics are compatible with EDTASM+ assembler mnemonics). For the mnemonics below, special symbols are:

  • A - 8-bit accumulator register.
  • B - 8-bit accumulator register.
  • CC - 8-bit condition code register.
  • D - 16-bit accumulator register comprised of A and B, with A being high byte, and B being low byte.
  • M - a memory location with a value between 0 and 65535.
  • S - 16-bit system stack register.
  • U - 16-bit user stack register.
  • X - 16-bit index register.
  • Y - 16-bit index register.

Mnemonics

Mnemonic Description Example
ABX Adds contents of B to value in register X and stores in X. ABX
ADCA Adds contents of A, memory value M, and carry bit and stores in A. ADCA $FFEE
ADCB Adds contents of B, memory value M, and carry bit and stores in B. ADCB $FFEF
ADDA Adds contents of A with memory value M and stores in A. ADDA #$03
ADDB Adds contents of B with memory value M and stores in B. ADDB #$90
ADDD Adds contents of D (A:B) with memory value M:M+1 and stores in D. ADDD #$2000
ANDA Performs a logical AND on A with memory value M and stores in A. ANDA #$05
ANDB Performs a logical AND on B with memory value M and stores in B. ANDB $FFEE
ANDCC Performs a logical AND on CC with immediate value M and stores in CC. ANDCC #01
ASLA Shifts bits in A left (0 placed in bit 0, bit 7 goes to carry in CC). ASLA
ASLB Shifts bits in B left (0 placed in bit 0, bit 7 goes to carry in CC). ASLB
ASL Shifts bits in M left (0 placed in bit 0, bit 7 goes to carry in CC). ASL $0E00
ASRA Shifts bits in A right (bit 0 goes to carry in CC, bit 7 remains same). ASRA
ASRB Shifts bits in B right (bit 0 goes to carry in CC, bit 7 remains same). ASRB
ASR Shifts bits in M right (bit 0 goes to carry in CC, bit 7 remains same). ASR $0E00

Pseudo Operations

Mnemonic Description Example
FCB Defines a single byte constant value. FCB $1C
FCC Defines a string constant value enclosed in a matching pair of delimiters. FCC "hello"
FDB Defines a two byte constant value. FDB $2000
END Defines the end of the program. END
EQU Defines a symbol with a set value. SCRMEM EQU $1000
INCLUDE Includes another assembly source file at this location. INCLUDE globals.asm
NAM Sets the name for the program when assembled to disk or cassette. NAM myprog
ORG Defines where in memory the program should originate at. ORG $0E00
RMB Defines a block of n bytes initialized to a zero value. RMB $8
SETDP Sets the direct page value for the assembler (see notes below). SETDP $0E00

Notes

  • SETDP - this mnemonic is used for memory and instruction optimization by the assembler. For example, if SETDP $0E00 is set, any machine instructions that use $0EXX as a memory location will be assembled using direct page addressing. Instructions such as JMP $0E8F will become JMP <$8F. The programmer is responsible for loading the direct page register manually - this mnemonic does not output opcodes that change the direct page register.

Operands

(Under construction)

Addressing Modes

(Under construction)

File Utility

The file utility included with the assembler package provides a method for manipulating and extracting information from image files (e.g. CAS or DSK files).

Listing Files

To list the files contained within a cassette or disk image, use the --list switch:

python file_util.py --list test.cas

The utility will print a list of all the files contained within the image, along with associated meta-data:

-- File #1 --
Filename:   HELLO
File Type:  Object
Data Type:  Binary
Gap Status: No Gaps
Load Addr:  $0E00
Exec Addr:  $0E00
Data Len:   39 bytes
-- File #2 --
Filename:   WORLD
File Type:  Object
Data Type:  Binary
Gap Status: No Gaps
Load Addr:  $0F00
Exec Addr:  $0F00
Data Len:   73 bytes
-- File #3 --
Filename:   ANOTHER
File Type:  Object
Data Type:  Binary
Gap Status: No Gaps
Load Addr:  $0C00
Exec Addr:  $0C00
Data Len:   24 bytes

Extracting to Binary File

To extract the files from a disk or cassette image, and save each one as a binary, use the --to_bin switch:

python file_util.py --to_bin test.cas

To command will list the files being extracted and their status:

-- File #1 [HELLO] --
Saved as HELLO.bin
-- File #2 [WORLD] --
Saved as WORLD.bin
-- File #3 [ANOTHER] --
Saved as ANOTHER.bin

Note that no meta-data is saved with the extraction (meaning that load addresses, and execute addresses are not saved in the resulting .bin files). If you only wish to extract a specific subset of files, you can provide a space-separated, case-insensitive list of filenames to extract with the --files switch:

python file_util.py --to_bin test.cas --files hello another

Which will result in:

-- File #1 [HELLO] --
Saved as HELLO.bin
-- File #3 [ANOTHER] --
Saved as ANOTHER.bin

Extracting to Cassette File

To extract the files from a disk image, and save each one as a cassette file, use the --to_cas switch:

python file_util.py --to_cas test.dsk

To command will list the files being extracted and their status:

-- File #1 [HELLO] --
Saved as HELLO.cas
-- File #2 [WORLD] --
Saved as WORLD.cas
-- File #3 [ANOTHER] --
Saved as ANOTHER.cas

If you only wish to extract a specific subset of files, you can provide a space-separated, case-insensitive list of filenames to extract with the --files switch:

python file_util.py --to_cas test.dsk --files hello another

Which will result in:

-- File #1 [HELLO] --
Saved as HELLO.cas
-- File #3 [ANOTHER] --
Saved as ANOTHER.cas

Common Examples

Below are a collection of common examples with their command-line usage.

Appending to a Cassette

To assemble a program called myprog.asm and add it to an existing cassette file:

python assembler.py myprog.asm --cas_file my_cassette.cas --append

Listing Files in an Image

To list the files contained within an container file (such as CAS or DSK file):

python file_util.py --list my_cassette.cas

This will print out a list of all the file contents on the cassette image my_cassette.cas. Note that BIN or binary only file contents only have a single program with no meta-information stored in them. As such, no information will be available for binary file types.

Extracting Binary Files from Cassette Images

To extract all the binary files from a cassette image:

python file_util.py --to_bin my_cassette.cas

Will extract all of the files in the image file my_cassette.bin to separate files ending in a .bin extension. No meta-information about the files will be saved in .bin format.

Extracting Binary Files from Disk Images

To extract all the binary files from a disk image:

python file_util.py --to_bin my_disk.dsk

Will extract all of the files in the image file my_disk.dsk to separate files ending in a .bin extension. No meta-information about the files will be saved in .bin format.

Comments
  • Direct Addressing Mode does not seem to work

    Direct Addressing Mode does not seem to work

    Describe the bug When using direct addressing mode, no bytes seem to be created. I am using ADCA as an example, but the issue seems to affect all direct addressing mode mnemonics.

    To Reproduce Steps to reproduce the behavior:

    1. Create a file and call it test.asm:
            ORG    $1000
            ADCA    <$9F
    
    1. Compile using: python assembler.py --print test.asm

    Expected behavior With the print parameter in place, it should produce this output:

    -- Assembled Statements --
    $1000                         ORG $1000                          ;                                         
    $1000      999F               ADCA <$9F     
    

    Actual behavior I am getting no byte codes at all:

    -- Assembled Statements --
    $1000                         ORG $1000                          ;                                         
    $1000                         ADCA <$9F     
    
    bug hacktoberfest-accepted 
    opened by icemanind 3
  • 16-bit instructions using program counter relative addressing should use 16-bit offsets

    16-bit instructions using program counter relative addressing should use 16-bit offsets

    Describe the bug 16-bit instructions using program counter relative addressing should use 16-bit offsets by default. Currently only LEAX, LEAY, LEAS and LEAU use the correct behavior. Program counter indexed relative addressing modes for instructions STX, STU, STD, ADDD, CMPX, LDD, LDX, LDU, SUBD, CMPD, CMPS, CMPU, LDS, CMPY, LDY, STS, and STY need to be fixed.

    To Reproduce

    1. Create a file called test.asm and add the following contents:
                    ORG     $3F00
    START           STX     1,PCR
                    LDA     #$0A
    NEXT            RTS
                    END     START
    
    1. Assemble the file with:
    python3 assembler.py test.asm --print
    
    1. Output will be:
    -- Assembled Statements --
    $3F00                         ORG $3F00                          ;            
    $3F00 AF8C01          START   STX 1,PCR                          ;          
    $3F03 860A                    LDA #$0A                           ;   
    $3F05 39               NEXT   RTS                                ;       
    $3F06                         END START                          ;
    

    Expected behavior Correct output should be:

    -- Assembled Statements --
    $3F00                         ORG $3F00                          ;      
    $3F00 AF8D0001        START   STX 1,PCR                          ;                  
    $3F04 860A                    LDA #$0A                           ;              
    $3F06 39               NEXT   RTS                                ;                
    $3F07                         END START                          ;  
    

    Desktop (please complete the following information):

    • OS: Ubuntu 20.04
    • Python Version: 3.8.10
    bug 
    opened by craigthomas 2
  • Create new `granule_fill_order` attribute to specify granule allocation preference

    Create new `granule_fill_order` attribute to specify granule allocation preference

    This PR updates the DiskFile class to have an attribute called granule_fill_order. This list-like object is exactly 68 elements long. Each entry in the list specifies the granule number that should be checked to see if it is empty. The order of the list reflects which granules are allocated first. In DiskConstants there is a constant called GRANULE_FILL_ORDER that mimics the way Disk BASIC attempts to allocate granules on the disk. In general, Disk BASIC attempts to fill granules near the center of the disk first to minimize head stepping. This same ordering is implemented within this PR. The class can be instantiated with a different ordering list, allowing for future customization when generating disk images. Unit tests updated to cover new conditions. This PR closes #73

    hacktoberfest-accepted 
    opened by craigthomas 1
  • Implement multi-byte FCB declaractions

    Implement multi-byte FCB declaractions

    This PR adds the ability to define multiple single byte declarations using a single FCB statement. Previously, all FCB statements only accepted a single byte definition. For example, to define 3 constant bytes, you would have to:

    FCB $55
    FCB $44
    FCB 17
    

    Now, FCB statements allow for multiple declarations per line, separated with a comma. The following would be equivalent to the code above:

    FCB $55,$44,17
    

    Unit and integration tests were added to catch new conditions. README.md documentation was updated to reference multi-byte functionality. This PR closes #53

    hacktoberfest-accepted 
    opened by craigthomas 1
  • Use granules closer to the middle of the disk

    Use granules closer to the middle of the disk

    A feature of Disk Extended Color Basic (DECB) is that it prefers to use granules that are closer to the file allocation table and directory entries (track 17) before using granules that are closer to the outer edges of the disk. This makes sense, since it means stepping the read/write head less frequently after reading the file system data. Currently, the assembler will do a search for free granules starting at granule 0 (the first track). While this isn't an issue when using virtual files, on real media, there may be a noticeable delay when loading data from disk, since the read/write head needs to step a lot in order to read the granule data. The purpose of this feature request is to enable the same behavior in the assembler for populating granules that is seen when using DECB.

    enhancement 
    opened by craigthomas 1
  • Refactor `DiskFile` class to work with new `VirtualFile` structure.

    Refactor `DiskFile` class to work with new `VirtualFile` structure.

    This PR restructures the DiskFile class to work with the new VirtualFile structure. While not included in any issues that were open at the time of the PR, this change allows at least disk information to be read and extracted from DSK virtual disks. Unit tests were added to cover a portion of the class. Note that errors may still exist, specifically when looking at files that do not have any preamble or postamble data (e.g. BASIC files).

    opened by craigthomas 1
  • Add unit tests for Version 1.0.0 release

    Add unit tests for Version 1.0.0 release

    This PR adds several new unit tests to cover various aspects of the code base that do not have proper unit tests. Significantly, this PR refactors many error handling routines, and pushes them up to outer classes to handle more cleanly. This PR also separates out I/O functions from the assembly routines, so that only data buffers are passed from object to object (this makes for simpler unit testing). Additionally, VirtualFile classes were overhauled, with a new VirtualFileContainer class introduced to distinguish between various container types such as cassette images, disk images, hard disk images, etc. Unit tests are still missing on source_file.py and virtual_file.py as the issue #6 will involve further modification of those files to implement virtual disk access and manipulation. This PR closes #69

    opened by craigthomas 1
  • Simplify handling of indexed PCR statements with expressions

    Simplify handling of indexed PCR statements with expressions

    This PR simplifies the handling of indexed statements that contain expressions in them. Originally, the code path created a mess of if statements to tackle whether an indexed expression occurred, and also had an expression on the left hand side. The result was an inconsistency into how those statements were handled as opposed to statements that had only a symbol in the left hand side. For example:

    STX ADDR,PCR
    

    is handled with different logic than:

    STX ADDR+1,PCR
    

    This created a bit of a debugging problem when it came time to reconcile the two code paths. This PR simplifies the handling of such statements by adding a single conditional statement. Additionally, the handling of negative values was pushed entirely to the NumericValue class, so that awkward statements such as jump_distance = 0x100 - jump amount to handle negative numbers didn't get scattered throughout the code base. A few unit tests were updated to catch these new conditions.

    opened by craigthomas 1
  • Fix for negative immediate values

    Fix for negative immediate values

    This PR closes issue #60 . Specifically, it fixes an issue whereby negative numbers were translated into their absolute value, resulting in positive value outputs instead of negative ones. Unit tests added to cover condition.

    opened by craigthomas 1
  • Immediate negative values not translated correctly

    Immediate negative values not translated correctly

    Describe the bug Immediate negative integer values not translated correctly.

    To Reproduce Steps to reproduce the behavior:

    1. Create a file called test.asm.
    2. Add the following lines to the test file:
                ORG  $0E00
        START   CMPB #-2
                END  START
    
    1. Run the assembler on the test file as follows:

      python3 assembler.py --print test.asm

    2. Output will be as follows:

    -- Assembled Statements --
    $0E00                         ORG $0E00                          ;                                         
    $0E00 C102            START  CMPB #-2                            ;                                         
    $0E02                         END START                          ;
    

    Expected behavior The compiled statement for the CMPB #-2 should not be C1 02. The value 02 should be negative, so FE. The output below should be correct:

    -- Assembled Statements --
    $0E00                         ORG $0E00                          ;                                         
    $0E00 C1FE            START  CMPB #-2                            ;                                         
    $0E02                         END START                          ;
    

    Desktop (please complete the following information):

    • OS: Ubuntu
    • Version: 20.04.4
    • Python Version: 3.8.10
    bug 
    opened by craigthomas 1
  • Add fix for registers A, B and D on the left side of indexed expressions

    Add fix for registers A, B and D on the left side of indexed expressions

    This PR fixes an error with the following types of statements:

    LDA  B,X
    

    The symbol B for accumulator B was not being resolved correctly, and would result in a stacktrace of:

    AttributeError: 'str' object has no attribute 'is_address_expression'
    

    Registers can now be specified in the left hand side of indexed expressions correctly. Unit tests added to catch condition.

    opened by craigthomas 1
  • Implement `ANDR` instruction

    Implement `ANDR` instruction

    Implement the ANDR 6309 instruction mnemonic in the assembler. Performs a logical AND with a source and destination register, storing the result in the destination register.

    Immediate - $1034, 4 bytes

    Register codes:

    D - 0000 X - 0001 Y - 0010 U - 0011 S - 0100 PC - 0101 W - 0110 V - 0111 A - 1000 B - 1001 CC - 1010 DP - 1011 E - 1110 F - 1111

    Example:

    ANDR A,B
    
    enhancement 6309 
    opened by craigthomas 0
  • Implement `ANDD` instruction

    Implement `ANDD` instruction

    Implement the ANDD 6309 instruction mnemonic in the assembler. Performs a logical AND with a double-byte and register D, storing in D.

    Immediate - $1084, 4 bytes Direct - $1094, 3 bytes Indexed - $10A4, 3+ bytes Extended - $10B4, 4 bytes

    Example:

    ANDD #$1010
    
    enhancement 6309 
    opened by craigthomas 0
  • Allow user-specified output widths

    Allow user-specified output widths

    Currently, the assembler prints out lines that are greater than 120 characters wide when using the --print or --symbols switches. Historically, console windows have been limited to 80 or 100 characters wide when initialized, unless users specify an override. In order for the output of the assembler to be more readable, the output width should be truncated to a reasonable size - approximately 100 or 120 characters. Additionally, a switch should allow for users to specify how wide they want the output to be when printing to the screen.

    enhancement 
    opened by craigthomas 0
  • Implement `AIM` instruction

    Implement `AIM` instruction

    Add the AIM instruction. Performs a logical AND of an 8-bit immediate value with the contents of a memory byte and stores it in the designated memory byte. Meant to collapse the LDA, ANDA, and STA 6809 operations to perform the same task.

    AIM: Direct - $02, 3 bytes Indexed - $62, 3+ bytes Extended - $72, 4 bytes

    The command works with the following syntax:

    AIM #$0E;$FFFE
    

    Note the semi-colon used to separate the immediate value and the memory address.

    enhancement 6309 
    opened by craigthomas 0
  • Check branch instructions for automated optimizations

    Check branch instructions for automated optimizations

    In certain circumstances, a user may issue an instruction such as:

    LBCC FUNCTION
    

    This instructs the CPU to perform a long branch to where FUNCTION is located in memory. Long branches are useful since they can be used to branch to anywhere in the 64K memory space. However, if FUNCTION is within +129 bytes or -126 bytes of the current instruction, then we can transform the LBCC to a BCC instead, saving several op-cycles, as well as a byte in instruction op-codes.

    enhancement 
    opened by craigthomas 0
  • Implement `ADDR` instruction

    Implement `ADDR` instruction

    Implement the ADDR 6309 instruction mnemonic in the assembler. Adds contents of a source register to the contents of the destination register. All registers except for Q and MD are allowed.

    Immediate - $1030, 3 bytes

    The command works with the following syntax:

    ADDR r0,r1
    

    Where r0 is the source and r1 is the destination. The source is stored as the high nibble of the operand byte, and the destination is stored as the low nibble of the operand byte. Valid source and destination values are:

    0000 - D 0001 - X 0010 - Y 0011 - U 0100 - S 0101 - PC 0110 - W 0111 - V 1000 - A 1001 - B 1010 - CC 1011 - DP 1110 - E 1111 - F

    Example:

    $10 30 8E     ADDR A,E
    
    enhancement 6309 
    opened by craigthomas 0
Releases(v1.1.0)
  • v1.1.0(Oct 9, 2022)

    The v1.1.0 release of the CoCoAssembler. This updated release of the assembler includes a file utility to manage binaries, virtual cassette files, and virtual disk files.

    • Compatible with Python 3.6+
    • Target systems Windows, Linux, UNIX, MacOS

    See the README.md file for more information on installation and usage information.

    What's Changed

    • Implement multi-byte FCB declaractions by @craigthomas in https://github.com/craigthomas/CoCoAssembler/pull/78
    • Create new granule_fill_order attribute to specify granule allocation preference by @craigthomas in https://github.com/craigthomas/CoCoAssembler/pull/80
    • Fix bug where non-machine language files could not be read by @craigthomas in https://github.com/craigthomas/CoCoAssembler/pull/81
    • Ability to extract CAS to DSK and DSK to CAS by @craigthomas in https://github.com/craigthomas/CoCoAssembler/pull/82
    • Allow for multi-word declarations by @craigthomas in https://github.com/craigthomas/CoCoAssembler/pull/83

    Full Changelog: https://github.com/craigthomas/CoCoAssembler/compare/v1.0.0...v1.1.0

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Sep 24, 2022)

    The v1.0.0 release of the CoCoAssembler. This initial release of the assembler includes a file utility to manage binaries, virtual cassette files, and virtual disk files.

    • Compatible with Python 3.6+
    • Target systems Windows, Linux, UNIX, MacOS

    See the README.md file for more information on installation and usage information.

    Source code(tar.gz)
    Source code(zip)
Owner
Craig Thomas
Waiting for the singularity
Craig Thomas
HatAsm - a HatSploit native powerful assembler and disassembler that provides support for all common architectures

HatAsm - a HatSploit native powerful assembler and disassembler that provides support for all common architectures.

EntySec 8 Nov 9, 2022
Convert three types of color in your clipboard and paste it to the color property (gamma correct)

ColorPaster [Blender Addon] Convert three types of color in your clipboard and paste it to the color property (gamma correct) How to Use Hover your mo

null 13 Oct 31, 2022
TB Set color display - Add-on for Blender to set multiple objects and material Display Color at once.

TB_Set_color_display Add-on for Blender with operations to transfer name between object, data, materials and action names Set groups of object's or ma

null 1 Jun 1, 2022
Print 'text color' and 'text format' on Term with Python

term-printer Print 'text color' and 'text format' on Term with Python ※ It may not work depending on the OS and shell used. PIP $ pip install term-pri

ななといつ 10 Nov 12, 2022
Scientific color maps and standardization tools

Scicomap is a package that provides scientific color maps and tools to standardize your favourite color maps if you don't like the built-in ones. Scicomap currently provides sequential, bi-sequential, diverging, circular, qualitative and miscellaneous color maps. You can easily draw examples, compare the rendering, see how colorblind people will perceive the color maps. I will illustrate the scicomap capabilities below.

Thomas Bury 14 Nov 30, 2022
A new mini-batch framework for optimal transport in deep generative models, deep domain adaptation, approximate Bayesian computation, color transfer, and gradient flow.

BoMb-OT Python3 implementation of the papers On Transportation of Mini-batches: A Hierarchical Approach and Improving Mini-batch Optimal Transport via

Khai Ba Nguyen 18 Nov 14, 2022
Configure request params such as text, color, size etc. And then download the image

Configure request params such as text, color, size etc. And then download the image

null 6 Aug 18, 2022
A simple single-color identicon generator

Identicons What are identicons? Setup: git clone https://github.com/vjdad4m/identicons.git cd identicons pip3 install -r requirements.txt chmod +x

Adam Vajda 1 Oct 31, 2021
The goal of this program was to find the most common color in my living room.

The goal of this program was to find the most common color in my living room. I found a dataset online with colors names and their corr

null 1 Nov 9, 2021
A lighweight screen color picker tool

tkpick A lighweigt screen color picker tool Availability Only GNU/Linux ?? Installing Install via pip (No auto-update): [sudo] pip install tkpick Usa

Adil Gürbüz 7 Aug 30, 2021
Coursework project for DIP class. The goal is to use vision to guide the Dashgo robot through two traffic cones in bright color.

Coursework project for DIP class. The goal is to use vision to guide the Dashgo robot through two traffic cones in bright color.

Yueqian Liu 3 Oct 24, 2022
Convert text with ANSI color codes to HTML or to LaTeX.

Convert text with ANSI color codes to HTML or to LaTeX.

PyContribs 326 Dec 28, 2022
It is a Blender Tool which can convert the Object Data Attributes in face corner to the UVs or Vertex Color.

Blender_ObjectDataAttributesConvertTool It is a Blender Tool which can convert the Object Data Attributes in face corner to the UVs or Vertex Color. D

Takeshi Chō 2 Jan 8, 2022
An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to art and design.

Awesome AI for Art & Design An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to a

Margaret Maynard-Reid 20 Dec 21, 2022
Python Interactive Graphical System made during Computer Graphics classes (INE5420-2021.1)

PY-IGS - The PYthon Interactive Graphical System The PY-IGS Installation To install this software you will need these dependencies (with their thevelo

Enzo Coelho Albornoz 4 Dec 3, 2021
The CS Netlogo Helper is a small python script I made, to make computer science homework easier.

The CS Netlogo Helper is a small python script I made, to make computer science homework easier. This project is really ironic now that I think about it.

null 1 Jan 13, 2022
A 100% python file organizer. Keep your computer always organized!

PythonOrganizer A 100% python file organizer. Keep your computer always organized! To run the project, just clone the folder and run the installation

null 3 Dec 2, 2022
To check my COVID-19 vaccine appointment, I wrote an infinite loop that sends me a Whatsapp message hourly using Twilio and Selenium. It works on my Raspberry Pi computer.

COVID-19_vaccine_appointment To check my COVID-19 vaccine appointment, I wrote an infinite loop that sends me a Whatsapp message hourly using Twilio a

Ayyuce Demirbas 24 Dec 17, 2022
⏰ Shutdown Timer is an application that you can shutdown, restart, logoff, and hibernate your computer with a timer.

Shutdown Timer is a an application that you can shutdown, restart, logoff, and hibernate your computer with a timer. After choosing an action from the

Mehmet Güdük 5 Jun 27, 2022