DCPUTeam / DCPUToolchain

[ARCHIVED] The code repository for the DCPU-16 Toolchain.
http://dcputoolcha.in/
MIT License
96 stars 14 forks source link

dtasm should output error if push/pop is used as wrong operand #226

Open orlof opened 11 years ago

orlof commented 11 years ago

dtasm should give loud error if stupid programmer writes code like set a, push or set pop, a

...coming from stupid programmer who just spent 3 hours without realizing this

patflick commented 11 years ago

unfortunately that is not soo easy, the lexer already turns POP and PUSH into the same opcode, and the lexer has no contextual information. i will think about this for a bit, but i don't see a nice solution to warn the user/programmer