Timeline for Assembler for Hack Assembly Language - Take 2
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 5, 2015 at 16:54 | vote | accept | Koray Tugay | ||
Mar 12, 2015 at 9:25 | comment | added | Aleksandr Dubinsky | @KorayTugay Keep working at it! A sense for code elegance takes years to develop and a lot of striving towards perfection. Study other libraries which you feel are well written. In NetBeans/Maven, it's easy to navigate to their source code. | |
Mar 11, 2015 at 19:52 | comment | added | Koray Tugay | Thanks a lot, I will study each comment of yours and try to apply them. Thanks. | |
Mar 11, 2015 at 19:35 | comment | added | Aleksandr Dubinsky |
@KorayTugay Another point: Assembler.assemble should take an InputStream , it shouldn't be passed to the constructor (so that the Assembler can be reused).
|
|
Mar 11, 2015 at 19:32 | comment | added | Aleksandr Dubinsky |
@KorayTugay It would be very much in the spirit of object oriented programming! I recognize the practicality of having a central encoder containing one big Map , which is why I suggest that it be an implementation detail of instructions (A instructions reference the A encoder, B instructions the B encoder). But if you must have an external encoder (perhaps, because you want to encode the same instructions to different ISAs), do not iterate over a list of them!
|
|
Mar 11, 2015 at 19:22 | comment | added | Koray Tugay | Great great comments. But are you sure about An Instruction should know how to encode itself (and expose toMachineCode()). ? | |
Mar 11, 2015 at 19:20 | history | answered | Aleksandr Dubinsky | CC BY-SA 3.0 |