Implemented modulo operation

This commit is contained in:
Eduard Urbach 2024-07-25 12:11:55 +02:00
parent fac8dba7ee
commit a31731a84d
Signed by: eduard
GPG key ID: 49226B848C78F6C8
7 changed files with 75 additions and 0 deletions

View file

@ -119,6 +119,9 @@ func (a Assembler) Finalize() ([]byte, []byte) {
case LABEL:
labels[x.Data.(*Label).Name] = Address(len(code))
case MODULO:
code = modulo(code, x.Data)
case MOVE:
switch operands := x.Data.(type) {
case *RegisterNumber: