ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

P3 Assembly

by rgcv ST3

A Sublime Text 3 assembly language syntax

Details

Installs

  • Total 701
  • Win 371
  • OS X 144
  • Linux 186
Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27
Windows 3 8 1 2 1 1 2 1 3 2 3 5 8 6 3 4 1 4 2 4 4 3 0 4 1 1 1 4 5 5 3 9 4 3 2 4 6 3 7 7 3 2 4 5 8 7
OS X 1 1 2 0 0 4 2 0 1 1 1 2 3 0 2 0 0 0 2 2 4 1 0 1 3 4 2 3 0 1 1 3 4 0 3 3 1 0 2 0 2 3 1 2 0 1
Linux 1 1 1 1 3 1 0 0 2 1 1 3 3 0 1 1 0 1 1 2 0 1 1 0 2 0 5 1 2 1 1 1 2 1 2 3 0 2 2 1 0 3 3 0 2 1

Readme

Source
raw.​githubusercontent.​com

P3 Assembly

A Sublime Text 3 assembly language syntax

Sidenote: Designed to accomodate the syntax of the P3 processor's assembly language, this theme is in no way a finished product. Feel free to contribute to the project or submit an issue detailing a problem with the project or what have you.

Still on a tangent, a color theme is not supplied with this package. It is purely a syntax for the P3 assembly language.

The P3 Processor

The P3 is a 16-bit word architecture processor used at Lisbon University's Superior Technical Institute (Instituto Superior Técnico da Universidade de Lisboa, IST@UL) in the Introduction to Computer Architecture subject of the Computer Science and Engineering BSc degree.

In practice, during the course's subject, a project is tailored for the first year's first semester students (freshmen, hopefully). Usually, or at least thus far, the project consists of creating a well-known game (or should I say recreating) using the P3 processor simulator, a Java application capable of simulating the assembled code to be loaded onto the processor itself on a later stage, during a demo or for testing purposes, since the simulator's.. not very feasible or reliable, if I may.

Some specifications

A few of the processor's specifications are listed below.

1. Registers

  • R0 - R7 - General use registers (R0 holds the constant 0)
  • PC - The program counter
  • SP - The stack pointer
  • RE - State register with 5 state bits, EZCNO, where
    • E: Enable interrupts
    • Z: Zero
    • C: Carry
    • N: Negative
    • O: Overflow

2. Memory

  • Address space: 64K words
  • Word size: 16 bits

3. I/O

  • I/O Addresses: Memory Mapped I/O from FF00h upward
  • Text Window: FFFCh - FFFFh
  • Interruptors (or switches): FFF9h
  • LEDs: FFF8h
  • LCD: FFF4h - FFF5h
  • 7-Segment display: FFF0h - FFF3h
  • Timer: FFF6h - FFF7h

4. Interrupts

  • Interrupt mask: FFFAh
  • Interrupt vector base: FE00h

More information can be found in the P3 processor simulator manual here (in portuguese).

Example Screenshot (using Monokai)

p3assembly-monokai