Package 'c64tass'

Title: Access TASS 6502 Assembler
Description: A simple wrapper for the TASS 6502 assembler.
Authors: mikefc
Maintainer: mikefc <[email protected]>
License: file LICENSE
Version: 0.1.0
Built: 2024-11-15 03:50:18 UTC
Source: https://github.com/coolbutuseless/c64tass

Help Index


Class wrapping the 64TASS assembler for easier testing of the R64 assembler

Description

Class wrapping the 64TASS assembler for easier testing of the R64 assembler

Class wrapping the 64TASS assembler for easier testing of the R64 assembler

Details

Set 'option(TASS_BIN=...)' and 'option(X64_BIN=...)' to set the assembler and emulator executable locations, or pass in as arguments 'TASS$new(tass_bin=..., x64_bin=...)'

Public fields

asm

the assembly code (as text)

tass_bin

location of TASS executable

prg

c64 PRG file with compiled 6502 machine code

debug

text output during compilation Initialise TASS

Methods

Public methods


Method new()

Usage
TASS$new(
  asm = NULL,
  tass_bin = getOption("TASS_BIN", "/opt/homebrew/bin/64tass")
)
Arguments
asm

the assembly code (as text)

tass_bin

location of TASS executable Compile asm with 64TASS

Note: Full TASS debugging output from the compilation step is kept in the variable debug. Use tass$get_debug() to access


Method compile()

Usage
TASS$compile(verbosity = 1)
Arguments
verbosity

verboseness when compiling. 0 = no output, 1 = messages from TASS compilation, 2 = all output from TASS


Method get_asm()

Get the ASM text

Usage
TASS$get_asm()

Method get_prg()

Get the compiled code as a raw vector

Usage
TASS$get_prg()

Method get_debug()

Get the TASS debugging output from compilation

Usage
TASS$get_debug()

Method clone()

The objects of this class are cloneable with this method.

Usage
TASS$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

## Not run: 
tass <- TASS$new("./asm/border.asm", tass_bin = "~/bin/64tass", x64_bin = "~/bin/x64")
tass$dump_asm()
tass$compile()
tass$get_prg()
tass$get_asm()
tass$compile_and_run()

## End(Not run)