Hello, I've started to program in Assembler and I got this task to tell the number of all upper case letters. I've got this code, but when I try to compile it an error pops out. Do you know where the problem could be?
CODE
Any tips?
CODE
.model small
.stack 100h
.data
type db "Your text: "
enter db 10, 13, "$"
bufer db 255
read db ?
result db "Result: $"
number db 0
.code
start:
mov ax, @data
mov ds, ax
mov ah, 9
mov dx, offset type
int 21h
mov ah, 0Ah
mov dx, offset bufer
int 21h
mov ah, 9
mov dx, offset enter
int 21h
mov cl, read
mov bx, offset bufer
mov dl, 'A'
mov dh, 'Z'
ciklas:
CMP [ds:bx], dl
JBE not
CPM [ds:bx], dh
JAE not
INC skaicius
not:
INC bx
DEC cl
CMP cl, 0
JNE ciklas
MOV byte ptr [ds:bx], '$'
mov ah, 9
mov dx, offset result
int 21h
mov ah, 4Ch
mov al, 0
int 21h
END start
.stack 100h
.data
type db "Your text: "
enter db 10, 13, "$"
bufer db 255
read db ?
result db "Result: $"
number db 0
.code
start:
mov ax, @data
mov ds, ax
mov ah, 9
mov dx, offset type
int 21h
mov ah, 0Ah
mov dx, offset bufer
int 21h
mov ah, 9
mov dx, offset enter
int 21h
mov cl, read
mov bx, offset bufer
mov dl, 'A'
mov dh, 'Z'
ciklas:
CMP [ds:bx], dl
JBE not
CPM [ds:bx], dh
JAE not
INC skaicius
not:
INC bx
DEC cl
CMP cl, 0
JNE ciklas
MOV byte ptr [ds:bx], '$'
mov ah, 9
mov dx, offset result
int 21h
mov ah, 4Ch
mov al, 0
int 21h
END start
Any tips?