Carica file su '21-02-22'

This commit is contained in:
Borededdy 2022-02-21 08:58:14 +00:00
parent 708fad93c9
commit cc6e31a0db
2 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,42 @@
; multi-segment executable file template.
data segment
; add your data here!
vet1 db 05h, 0Ah, 10h
ris db 00h
ends
stack segment
dw 128 dup(0)
ends
code segment
start:
; set segment registers:
mov ax, data
mov ds, ax
mov es, ax
mov ax, 00h
mov cx, 00h
mov cl, 02h
mov al, vet1[si]
inizio-ciclo:
inc si
add al, vet1[si]
loop inizio-ciclo
mov ris, al
mov ah, 9
int 21h ; output string at ds:dx
; wait for any key....
mov ah, 1
int 21h
mov ax, 4c00h ; exit to operating system.
int 21h
ends
end start ; set entry point and stop the assembler.

View File

@ -0,0 +1,53 @@
; multi-segment executable file template.
data segment
; add your data here!
num1 db 25h
num2 db 0Ah
num3 db 5h
ris db 00h
ends
stack segment
dw 128 dup(0)
ends
code segment
start:
; set segment registers:
mov ax, data
mov ds, ax
mov es, ax
; add your code here
mov ax, 00h
mov bx, 00h
mov dx, 00h
mov cx, 00h
mov al, num1
mov bl, num2
mov cl, num3
inizio-ciclo:
cmp cl, 0
je fine-ciclo
add dl, al
add dl, bl
dec cl
jmp inizio-ciclo
fine-ciclo:
mov ris, dl
mov ah, 9
int 21h ; output string at ds:dx
; wait for any key....
mov ah, 1
int 21h
mov ax, 4c00h ; exit to operating system.
int 21h
ends
end start ; set entry point and stop the assembler.