Menu

How add new cpu opcodes at source code level

To add new cpu opcodes we need to change these files: simulate.H and simulate.C
So we have to proceed with these steps:

(1) modify the file simulate.H
Go at the bottom of this file under the comment //New Opcodes and add your new opcode ABC as last and before end_ops
For example:
//New Opcodes
MDIV , // MDIV R, 10, M : (S>D) -- Calc Modulus and Division putting them into destination Registers
STX , // STX 0xFF , M : (S>D) -- Store immed. value into contents of [MemoryAddress] pointed by Register
+ ABC , // short description

(2) modify the file simulate.C
Go at the bottom of this file under the comment //New Opcodes and add your new opcode ABC
For example:

Posted by Davide Ug. Lini 2018-05-20

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.