News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

I Got Question About

Started by ayao, March 27, 2014, 11:03:16 PM

Previous topic - Next topic

ayao


Hello i got another question. i got problem with displaying using edi. it only show weird symbol around it

.data?

num1 dd ?
num2 dd ?



.code

start:

     
main proc


print chr$("                    ======================================"),0Ah
mov num1,sval(input("                    Enter a number:"))
mov num2,sval(input("                    Enter a number:"))



mov edi, offset  num1

mov ebx, num1
mov eax, num2
CMP ebx, eax


mov ebx,eax
mov edi, offset num2



print "The Largest Number is:", 13, 10
print edi,13,10

                   
inkey
exit

main endp
end start

jj2007

Read the documentation of sval. Hint: It's in the help folder.

ayao

which files has the sval i been looking for it all i have in my help folder is fpuhelp.chm opcodes.chm

dedndave

hlhelp.chm, Macro Catagories, String Macros

jj2007

Quote from: ayao on March 28, 2014, 05:08:16 AMall i have in my help folder is fpuhelp.chm opcodes.chm

Yeah, I have the same habit: Whenever I install a software package, the first action is to throw away the help files. They are useless anyway.

raymond

Glad to hear that my fpulib helpfile is useless. :( :eusa_clap: :eusa_clap: :biggrin:
Whenever you assume something, you risk being wrong half the time.
https://masm32.com/masmcode/rayfil/index.html

dedndave

not at all Ray
i have a quick reference shortcut for it on my desktop   :t

jj2007

OMG I forgot the irony tags :dazzled:

ayao

thanks alot  i did not have this on my help folder hlhelp.chm, Macro Catagories, String Macros
but trial and error i fix my code thanks. was wondering how to make program count to 10 - 20 ?

Gunther

Quote from: ayao on March 28, 2014, 05:03:33 PM
thanks alot  i did not have this on my help folder hlhelp.chm, Macro Catagories, String Macros
but trial and error i fix my code thanks. was wondering how to make program count to 10 - 20 ?

With a sensible installtion, all necessary help files are there - if not deleted. That's the point.

Gunther
You have to know the facts before you can distort them.

dedndave

if you are missing files, i suggest re-installing the package

count from 10 to 20
there are many ways to do this
        mov     esi,10

loop00:

;do loop stuff

        inc     esi
        cmp     esi,20
        jbe     loop00

ayao

mov     esi,10

loop00:

;do loop stuff

        inc     esi
        cmp     esi,20
        jbe     loop00


thank alot but i was wondering when i tried and test the code how do i display 10 to 20  it goes directly to number 20

dedndave

        include     \masm32\include\masm32rt.inc

        .CODE

start:
        mov     esi,10

loop00:

        print   str$(esi),32

        inc     esi
        cmp     esi,20
        jbe     loop00

        print   chr$(13,10)
        inkey
        exit

        END     start

Gunther

Hi ayao,

Quote from: ayao on March 29, 2014, 04:33:37 PM
thank alot but i was wondering when i tried and test the code how do i display 10 to 20  it goes directly to number 20

it's a simple loop. Are you familiar with that?

Gunther
You have to know the facts before you can distort them.