emu8086 Docs
Examples
Examples
This applications comes prebuilt with some examples which you can run, to add an example open a pull request and ensure you conform to these requirements
The example must contain at least one line of useful code
Things like this are not valid
; ------- startlabel: equ 50
The example must not contain MASM syntax as it is not supported
It must not conatin operations that are not yet implemented
Checkout the example below
ArraySum
Text
sum: equ 0x900 ; Address to store summain: mov sp, 128 ; Initialize stack for use push cs ; Set ds, es segments to cs = 0x7f00 push cs pop ds pop es mov ax, 5 push ax mov ax, Array push ax call ArraySum call WriteDec ; display the sum jmp endArraySum: push bp mov bp,sp ; set frame pointer push si ; save ESI mov word [sum], 0 ; sum = 0 mov si,Array ; array pointer mov cx,5 ; countL1: mov ax,[si] ; get array value add [sum],ax ; add to sum add si,2 ; next array position loop L1 pop si ; restore si pop bp retWriteDec: mov ax, [sum] int 40 retArray: dw 50 dw 50 dw 50 dw 50 dw 50end: nop
For a full list of examples check here
Edit this page on GitHub