Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
savnik said:limithi equ .13
limitlo equ .12
Debug equ 1
What mean this:
oneMhz equ .1000000/.200
1000000/200=5000
so the variable 'oneMhz' has a numeric value of 500
What mean this:
movlw high oneMhz ; move the high byte of the WORD variable 'oneMhz' into W
movwf limithi ;move the W value into REG limithi
movlw low oneMhz ; move low byte of the WORD variable into W
movwf limitlo; move the W value into the REG limitlo
And what mean this:
!Debug
This code is from AN592 and use MPASM v5.06ericgibbs said:I dont know which assembler you are using, cant help you with 'debug' in this context.
savnik said:This code is from AN592 and use MPASM v5.06
which is the difference:
oneMhz equ .1000000/.200
hndredK equ .100000/.20
ericgibbs said:I dont know which assembler you are using, cant help you with 'debug' in this context.
i want to understand the codeericgibbs said:hi,
Looking at the MPASM data, it appears that 'debug' instructs the assembler to make a 'debug file' .
In my assembler a number with a '.' in front is read as a decimal number.
oneMhz equ .1000000/.200
hndredK equ .100000/.20
They are the same, ie: 5000, I also think your assembler recognises the requirement for a WORD variable. ie: 16 bits.
The 5000 is just BYTE sized!.
What are you trying to do?
thank you for answerNigel Goodwin said:Makes no difference what it is, the assembler will just do a text replacement, changing every occurance of 'Debug' to '1'
The ! is the logic operator NOT, so in this case means 'NOT 1'.
the oneMhz is fixed number and equ to .1000000/.200savnik said:limithi equ .13
limitlo equ .12
Debug equ 1
What mean this:
oneMhz equ .1000000/.200
What mean this:
movlw high oneMhz
movwf limithi
movlw low oneMhz
movwf limitlo
And what mean this:
!Debug
you are right , so Nigel change the title to AN592 MPASM query.3v0 said:A tip.
Using a title like query is a bad thing to do because it could be a question about anything.
A good title would have been assembler query or even better AN592 MPASM query,
Such titles attract people who know the answer and allow the people who do not to skip reading it to find out what your query is about.
hi,Nigel Goodwin said:Makes no difference what it is, the assembler will just do a text replacement, changing every occurance of 'Debug' to '1'
The ! is the logic operator NOT, so in this case means 'NOT 1'.
savnik said:you are right , so Nigel change the title to AN592 MPASM query.
ericgibbs said:hi,
I dont normally use the 'shorthand' symbols, didnt recognise it.
How do you feel about the use of these symbols in your coding?.
I have always been advised not to use them as their meanings can vary from one asm to another?.
Nigel Goodwin said:I checked the MPASM helpfile
Well it's not 'coding' anyway, they are all assembler directives.
ericgibbs said:Whatever!
I appreciate that you don't have to give a straight answer to a question or in fact any answer at all.
But it would be refreshing, just once in a while, to see you give a meaningful response to a reasonable question from a forum member.
savnik said:the oneMhz is fixed number and equ to .1000000/.200
which is the high oneMhz , and which is the low oneMhz