We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Good day! Can someone check my code for mistakes? And, if there are mistakes, help me to fix it. This procedure should swap bits in R0 and be 'effective'.
//'n' is bit, that procedure should swap with 'm' n equ 1 m equ 4 push R0 call swap swap: pop R0 push A mov 20h, R0 mov C, 20h.n mov 21h.0, C mov C, 20h.m mov 20h.n, C mov C, 21h.0 mov 20h.m, C mov R0, 20h pop A RET
So also simulate it on paper without the PC!
Draw columns (or use squared paper) to record each register & memory location before & after each instruction.
www.avrfreaks.net/.../2539006
www.avrfreaks.net/.../1383161
This is how we did it at school - called a "dry run"
Nowadays, you could save some of the manual effort by using a spreadsheet ...
It seems that some still do:
teachinglondoncomputing.org/.../
My first computer programs were written and run on paper; back in 1977. But then the 4004 was way out of reach of my pocket money.