Skip to content

Bugfixes and Makefile#1

Open
ViStefan wants to merge 4 commits into
El-Virus:masterfrom
ViStefan:master
Open

Bugfixes and Makefile#1
ViStefan wants to merge 4 commits into
El-Virus:masterfrom
ViStefan:master

Conversation

@ViStefan
Copy link
Copy Markdown

@ViStefan ViStefan commented Apr 21, 2026

assembler didn't worked for me. In gdb it broke around line 1126 while parsing JMP instruction in default marcos.src.

if (stwork.back() == Tokens::_JMP) {
	pullJump(twork.back());
	twork.pop_back();
	stwork.pop_back();
}

switch (twork[0]) {

We're trying to access element of vector twork, but just pop_backed the only element in it as JMP has no operands. Adding guard if (twork.size() > 1) kinda fixed it.

Also, in processor.hpp include of misc.hpp was forgoten, while it uses namespace BITMAN and in processor.cpp it looks like long binary constant 0x0000000000100000 was written as hexadecimal literal by mistake. My compiler warned an overflow of unsigned short.

Added Makefile to build sim, assembler and main binary.

looks like misc.hpp include was forgotten, but BITMAN namespace is used
also long constants look like binary, but they were hex literals, my compiler complained on overflow of unsigned short
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant