Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

need some help

wsws909wsws909 Member Posts: 2
Hi there

I'm really getting stuck with this code. i need to turn it to work on 6800 Assembly. Can any one please help me with this.

.model small
.stack 64h
.data
msg db "enter a number: $"
error db "out of range, try again",13,10,"$"

.code
main proc
mov ax,@data
mov ds,ax

print_msg:
mov ah,9
lea dx,msg
int 21h

mov ah,1
int 21h

cmp al,30h
jb @e
cmp al,40h
ja @e

jmp @o

@e:

call line

mov ah,9
lea dx,error
int 21h

jmp print_msg

@o:

mov cl,al
mov dl,al
int 21h
loop @B

mov ax,4c00h
int 21h

main endp

line proc
mov ah,2
mov dl,13
int 21h
mov ah,2
mov dl,10
int 21h
ret

line endp

end main

Comments

Sign In or Register to comment.