I need to write an assembly language program that processes an array of max 20 bytes. The program's to display the array as it's entered directly and in the opposite order (vice versa). What is really missing?
e.g. a b c d e f g h i j 0 1 2 3 4 5 6 7 8 9 (straight)
the program accepts data from the console and displays it directly (without reversing)
What do I really have to do to make the entered string display ?
What needs to be changed for the characters to be displayed after typing in the console ?
Chain.asm
; The program demonstrates the use of the 10th interrupt function 21h
; to load a string directly into pao
;author: xyz
.286
.model small
.data
Inscription db "Enter the inscription",13,10,'$'
bufor db 20,0,20 dup ('$')
.code
start:
;przyg. segmentowej cz. adresu
mov ax, seg _data
mov ds, ax
;przyg. offsetowej cz. adresu
mov dx, offset napis
;display the inscription
mov ah, 09h
int 21h
;load chain
mov dx, offset bufor
mov ah, 0ah
int 21h
mov ax,4c00h
int 21h
end start
Loop
;The program demonstrates the use of the 2nd interrupt function 21h
;to read single characters to pao through the al register
;author: xyz
.286
.model small
.data
inscription db "Enter the inscription",13,10,'$'
bufor db 20,0,20 dup ('$')
.code
start:
;przyg. segmentowej cz. adresu
mov ax, seg _data
mov ds, ax
;przyg. offsetowej cz. adresu
mov dx, offset napis
mov di, dx
;wyswietlenie znakow
mov cx, 10h
mov ah, 02h
print:
mov dl,ds:[di]
int 21h
inc di
dec cx
print now
;wczytanie znakow
mov dx, offset bufor
mov di, dx
mov ah, 01h
enter:
int 21h
mov ds:[di], al
inc di
cmp al, 13 ;czy enter?
already type
mov ax,4c00h
int 21h
end start
.intel_syntax noprefix. Don't use tags which don't apply. It looks like MASM or TASM syntax to me.