Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

wandernauta/arcvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arcvm

This is arcvm, an (unofficial) virtual machine for the fictional ARC architecture, as used in the book "Computer Architecture and Organization: An Integrated Approach" by Miles Murdocca and Vincent Heuring. It tries to be completely compatible with the instruction set described in the book, but also integrates the improvements in recent versions of the ARCTools, as well as adding some features on its own. The practical upshot of this is that all programs written for, and assembled with, the ARCTools should run unmodified on arcvm.

Compared with the official simulator, arcvm has the following features:

  • Simple video output. A scaled 320x240, 8-bit color, fixed-palette virtual display is available.
  • Performance. The virtual machine itself is written in C and plenty fast.
  • Compatibility. Arcvm implements the same instruction set as the ARCTools, and runs the .bin files the ARCTools assembler generates.

Also bundled is a set of standard libraries that provide handy subroutines for common operations, as well as a tool (arcpp) for 'linking' with those libraries.

Examples

The VM ships with a host of examples in the asm/ directory.

  • colnames.bin: Fills the screen with pixels of changing color. Slow.
  • edit.bin: A fake editor. Typing, backspace and enter 'work'.
  • hello.bin: Prints 'Hello, world!' to the console.
  • logo.bin: Draws the arcvm logo to the screen.
  • pixel.bin: Draws a palette to the screen.
  • wargames.bin: Shall we play a game?

Libraries

A number of utility libraries are available, providing higher-level access to the video and console interfaces, among other things. Read the README file in the asm directory for library documentation. The examples above also use the libraries.

  • libchk.arc: Assertions and checks.
  • libchr.arc: Character constants.
  • libcol.arc: Color names.
  • libcon.arc: Console output and keyboard input.
  • libdev.arc: I/O offsets for directly interfacing with peripherals.
  • libfnt.arc: Bitmap font character generator.
  • libgfx.arc: Graphics macro's.
  • liblib.arc: Utilities for building libraries.
  • libmem.arc: Higher-level memory subroutines.

License

Arcvm is distributed under the terms of the ISC License. Read the LICENSE.mkd file for details.

NOTE: If you are looking for the official ARCTools assembler and simulator, this is not it. Go to http://iiusatech.com/murdocca/CAO/.

About

A fast virtual machine for the ARC architecture

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published