I downloaded a PIC 16F88 programme from the internet; both the .asm and associated .hex file.
To cut a long story short, I tried to assemble the .asm in MPLAB but a host of error messages appeared relating to the variables in the floasc.inc file (see the .asm fragment below).
It claims they are not defined even though they appear to be defined in the math16.inc file. (I downloaded these files and the relevant AN notes from the Microchip web site)
So I disassembled the .hex using WinPicProg 1.95e to see if it would help me to resolve the issue.
But, as you can see in the .hex fragment below, it worked well until it reached ORG 0x0800.
After that point, there are no labels in the left hand column.
As I have not used .inc files before, I assumed that there would be sufficient info in them to allow a successful assembly.
Fragment from the disassembled .hex.
Label_006E DECFSZ 0x41 , f
GOTO Label_006E
DECFSZ 0x42 , f
Label_00E0 GOTO Label_006F
RETURN
Label_0062
Label_005D
.
There are 33 labels (& no instructions) at this point, so I deleted 30 to save space.
.
Label_0058
ORG 0x0800
MOVLW 0x82
MOVWF 0x2F
MOVLW 0x09
MOVWF 0x2C
GOTO Label_0070
MOVLW 0x85
MOVWF 0x2F
Fragment from the .asm at the ORG 0x0800 point.
decfsz XF1,f
goto $-1
decfsz XF2,f
goto $-4
return
org 0x800
#include <math16.inc>
#include <floasc.inc>
Start_Process
bcf STATUS,RP1
bcf STATUS,RP0
movlw 0x07
movwf count
My questions are:-
1. Do I need to modify 1 or both .inc files to define the variables?
2. Does anyone know how I can make WinPicProg fully disassemble .hex files beyond the ORG 0x0800?
3. If not, is there other software availabe that will?
Any assistance will be appreciated.
To cut a long story short, I tried to assemble the .asm in MPLAB but a host of error messages appeared relating to the variables in the floasc.inc file (see the .asm fragment below).
It claims they are not defined even though they appear to be defined in the math16.inc file. (I downloaded these files and the relevant AN notes from the Microchip web site)
So I disassembled the .hex using WinPicProg 1.95e to see if it would help me to resolve the issue.
But, as you can see in the .hex fragment below, it worked well until it reached ORG 0x0800.
After that point, there are no labels in the left hand column.
As I have not used .inc files before, I assumed that there would be sufficient info in them to allow a successful assembly.
Fragment from the disassembled .hex.
Label_006E DECFSZ 0x41 , f
GOTO Label_006E
DECFSZ 0x42 , f
Label_00E0 GOTO Label_006F
RETURN
Label_0062
Label_005D
.
There are 33 labels (& no instructions) at this point, so I deleted 30 to save space.
.
Label_0058
ORG 0x0800
MOVLW 0x82
MOVWF 0x2F
MOVLW 0x09
MOVWF 0x2C
GOTO Label_0070
MOVLW 0x85
MOVWF 0x2F
Fragment from the .asm at the ORG 0x0800 point.
decfsz XF1,f
goto $-1
decfsz XF2,f
goto $-4
return
org 0x800
#include <math16.inc>
#include <floasc.inc>
Start_Process
bcf STATUS,RP1
bcf STATUS,RP0
movlw 0x07
movwf count
My questions are:-
1. Do I need to modify 1 or both .inc files to define the variables?
2. Does anyone know how I can make WinPicProg fully disassemble .hex files beyond the ORG 0x0800?
3. If not, is there other software availabe that will?
Any assistance will be appreciated.
Last edited: