Skip to content

Instantly share code, notes, and snippets.

@campaul
Last active August 29, 2015 14:09
Show Gist options
  • Select an option

  • Save campaul/71f32a577fe39c388c31 to your computer and use it in GitHub Desktop.

Select an option

Save campaul/71f32a577fe39c388c31 to your computer and use it in GitHub Desktop.
Potential Octave Stack Operations

Interrupt State

000 00 : HALT (wait for interrupt)
000 01 : IDT[HIGH] <- R0
000 10 : IDT[LOW] <- R0
000 11 : IENABLE <- R0 // 1 bit for each device, so IENABLE 0 disables interrupts

Function Operations

001 00 : CALL
001 01 : RET
001 10 : TRAP
001 11 : IRET

Push/Pop

010 RS : SP++, MEM[SP] <- RS
011 RD : RD <- MEM[SP], SP--

Read from Stack + Offset

1 RD RS : RD <- MEM[SP + RS]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment