PDA

View Full Version : Assemler Errors



BANDAJOSH
- 3rd April 2011, 16:55
Am getting the Errors below ,can any one help me figure out where
the Problem in my Program is,Am Trying to write a program for
Controlling a Diesel Power Generator Engine.
Note I don't have anything like "Write" in my Program apart
from the WRITE command of PBP fro writing to the EEPROM when
the Program is already Running

Assembler ERROR

Error PRETTY~1.ASM 1068:[255]udefined sysmbol 'write'
Error PRETTY~1.ASM 1176:[255]udefined sysmbol 'write'
Error PRETTY~1.ASM 1283:[255]udefined sysmbol 'write'

ScaleRobotics
- 3rd April 2011, 17:31
Hello,

I could be wrong here, but it looks like you are using an assembler without a PBP compiler? Have you purchased a PBP compiler? You will need one to compile the code to hex.

Darrel Taylor
- 3rd April 2011, 22:25
If you have PBP 2.60 (original release) ...
There was an issue with the WRITE statement when you only used a WORD variable but didn't use the WORD modifier.

There were several workarounds...

WRITE a BYTE value somewhere in your program. (anywhere)
<br>
WRITE the WORD variable as a WORD...
WRITE 0,WORD MyWord
<br>
Or add this line to your program...
DEFINE WRITE_USED 1

The problem was corrected in PBP 2.60A.
You can download the "C" patch from here...
http://melabs.com/support/patches.htm

BANDAJOSH
- 4th April 2011, 16:03
Thanks Guys for the Reply ,but
1.I Know am using Original PBP I Purchased from MELABS themselves over the
Internet + LABX1 Board ,and these were Delivered(2 CD's + a PBP Manual)
to me here in Uganda East Africa.

I've no regrets for the Money I spent on this ,coz its the Only
PIC System out of The 2 I've Bought from UK That works wonders for me.
2.Last Evening after Posting my Challenge with PBP ,I added More Code with
"WRITE" Commands ,and Guess what ? ,on Compiling ,the Errors were no
More.

3.Now two More Challenges(or Problems)
i)Now I've so far got 3 Warning of Code Crossing Boundary

Warn PRETTY~1.ASM 765 :[102]code crosses boundary @800h
Warn PRETTY~1.ASM 1453 :[102]code crosses boundary @1000h
Warn PRETTY~1.ASM 2174 :[102]code crosses boundary @1800h

Will this Stop my Program from work or Loading into PIC16F877A

ii) How do I know how much CODE SPACE I've used up or Left with
Because it Looks Like My code is going to be Big despite the Fact
that am trying to Scale it down by Making Several Sub-Routines
to avoid Code replication when its already being used
else Where.
Am Great full for four response.

Acetronics2
- 4th April 2011, 19:54
Hi, Bandajosh

Those are Warnings ... and are just here to tell you to take care to bank or page change if some assembler lines are used.
Most of time you don't have to worry about them ... especially if using only PBP.

To know how much memory used ... the best is use MPLAB as an IDE : there's the "memory usage Gauge" or also a look to the "program window" ...

using Codestudio ... just have a look to the lower left corner of your screen after compilation ...

Alain

Darrel Taylor
- 4th April 2011, 20:13
By adding the extra WRITE commands, you are probably writing a BYTE value now instead of only a WORD, which will make the error go away as described above.

The crossing code boundary issue has been discussed many times here on the forum.

In Microcode Studio, go to View > Editor Options > General Tab
Check the Disable 'code crosses boundary' ASM warning checkbox.
If you are using the BRANCH statement, change it to BRANCHL.