help plz, printout memory bullshit , tnks. - Programmers Heaven

Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

help plz, printout memory bullshit , tnks.

MODEL SMALL
.STACK 100h
.8086
.DATA

por1 DB 'Choose a number 0 - 1000',13,10,'$'
por2 DB 'Enter the reminder of your number by 3 5 7 B(Hexa)',13,10,'$'
por3 DB 'separated by a single space',13,10,'$'
por4 DB 'For example 1 4 5 A','$'
outputstr DB 'your number is : ',13,10,'$'
COUNT DW 4
rem3 dw 385
rem5 db 231
rem7 dw 330
remmod dw 1155
remB db 210d

.CODE

Begin:
MOV AX,@DATA
MOV DS,AX

MOV DX,OFFSET por1
MOV AH, 9
INT 21H


MOV DX,OFFSET por2
MOV AH, 9
INT 21H


MOV DX,OFFSET por3
MOV AH, 9
INT 21H


MOV DX,OFFSET por4
MOV AH, 9
INT 21H


LOOPIN:
MOV AH,1
INT 21H
CMP AL,' '
JE LOOPIN
CMP COUNT,1
JNE DEXLOOP
MUL REMB
ADD DX,AX
JMP FIRSTROUND


DEXLOOP:
CMP COUNT,4
JE LP4
CMP COUNT,3
JE LP3
CMP COUNT,2
JE LP2
LP4:
MUL REM3
ADD DX,AX
DEC COUNT
JMP LOOPIN


LP3:
MUL REM5
ADD DX,AX
DEC COUNT
JMP LOOPIN

LP2:
MUL REM7
ADD DX,AX
DEC COUNT
JMP LOOPIN


modcalc:
sub dx, 1155
FIRSTROUND:
cmp dx, 1155
ja modcalc

MOV BX,DX
MOV DX,OFFSET OUTPUTSTR
MOV AH,9
INT 21H
MOV DX,BX
MOV AH,9
INT 21H



MOV AH,4CH
INT 21H
END Begin
Sign In or Register to comment.