Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://stackoverflow.com/questions/28665528/while-do-while-for-loops-in-assembly-language-emu8086
- https://www.geeksforgeeks.org/purpose-of-an-interrupt-in-computer-organization/
- https://stackoverflow.com/questions/27487137/assembly-language-if-and-else-statements/33737370
- https://stackoverflow.com/questions/47556705/what-does-xlat-instruction-do-in-8086
- For 8086 assembly, something like this:
- if(x == 1) {
- add();
- }
- Would become something like this:
- cmp ax,1
- jne .skipIt
- call add
- .skipIt:
- xor cx,cx ; cx-register is the counter, set to 0
- loop1 nop ; Whatever you wanna do goes here, should not change cx
- inc cx ; Increment
- cmp cx,3 ; Compare cx to the limit
- jle loop1 ; Loop while less or equal
- mov cx,4 ; 4 iterations
- loop1 nop ; Whatever you wanna do goes here, should not change cx
- loop loop1 ; loop instruction decrements cx and jumps to label if not 0
- times 4 nop
Add Comment
Please, Sign In to add comment