Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ah, got it, thanks. But why not 0 to 1 with step size 1? Wouldn't that also give two passes, which should be sufficient, and which the said normal way also does?


There were four OPT (modes) for the assembler, numbered 0 to 3. 0 suppressed all errors and screen output. 3 did the opposite.

Using 1 would suppress errors, which would mean you wouldn't know if your code was bad.

You could use 0 and 3 or, if you don't want a listing, 0 and 2.

Search this page for 'first pass', for a more complete explanation: https://central.kaserver5.org/Kasoft/Typeset/BBC/Ch43.html


I think it's clear now - mode 0 is used to suppress the error messages about yet-unseen labels in the first pass, and 3 to give the output with any errors. Meanwhile, by the end of the first pass, all labels would have been seen, so in the second pass, the assembler could insert the correct addresses for them, at the places where those labels were used in jump statements, even if some of those statements were before where the labels were defined.

But I'll check that page out anyway.

Thanks again.


100% correct.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: