I'm working on a program that will find the prime factors to an unsigned integer that is entered by the user. I just have to make sure the program can handle a number up to 1000. I'm writing assembly in x86. I have already got a prompt for the user and got the number from the user, but I don't know how to go from here. I know I have to find the prime factors that make up that number using a jump loop and using divide, but I'm kinda lost here. Any help would be appreciated.
Thanks for the help.
TITLE MASM Template (main.asm) INCLUDE Irvine32.inc .data ;Declare values myMessage BYTE "Enter an unsigned integer: ", 0 ;Stores a string myMessage2 BYTE " ",0dh,0ah, 0 ;Stores a string .code ;Declare main main PROC ;Declare proc call Clrscr ;Clears the screen mov eax, 0 ;Clear eax mov ebx, 0 ;Clear ebx mov ecx, 0 ;Clear ecx mov edx, OFFSET myMessage ;Mov message into edx call writestring ;Display to screen call readdec ;Reads the input number and store into eax in decimal form. call writedec ;Display the value located in eax in decimal form on screen. mov edx, OFFSET myMessage2 ;Mov message into edx call writestring ;Display to screen exit ;Exit main main ENDP ;Exit proc END main ;Tells the program that it is the end