|
|
View previous topic :: View next topic |
Author |
Message |
Sherpa Doug Guest
|
PUTS limitations? |
Posted: Mon Apr 28, 2003 9:53 am |
|
|
<font face="Courier New" size=-1>The following is a set of help messages I want to send out in response to a user query. On the 16C58A address 0600 - 07FF is the last segment of ROM and is empty except for this function. I can send any 3 or 4 lines but if I uncomment more than that I get "OUT of ROM" even though there is lots of space in the segment. Why? Using #seperate instead of #org produces about the same result. I am using PCB 3.110.
#org 0x0600
SendHelp() { //Spew help messages
puts("Fxxxxx<cr> sets frequency to xxxxx Hz");
// puts("Bxxxxx<cr> sets burst length to xxxxx microseconds");
// puts("Dxxxxx<cr> sets Responder delay in microseconds");
// puts("P1<cr> to enable 1pps pinger mode");
puts("P0<cr> to disable pinger mode");
// puts("Only frequencies between 25kHz and 30kHz supported");
// puts("due to transducer limitations");
puts(__TIME__ __DATE__);
Verbose = false;
}
Segment Used Free
--------- ---- ----
0000-01FF 360 149
0200-03FF 406 90
0400-05FF 214 281
0600-07FF 74 426
Thanks,
</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 14026 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: PUTS limitations? |
Posted: Mon Apr 28, 2003 12:04 pm |
|
|
:=The following is a set of help messages I want to send out in response to a user query. On the 16C58A address 0600 - 07FF is the last segment of ROM and is empty except for this function. I can send any 3 or 4 lines but if I uncomment more than that I get "OUT of ROM" even though there is lots of space in the segment. Why? Using #separate instead of #org produces about the same result. I am using PCB 3.110.
----------------------------------------------------------
I don't have PCB, but I took your code and compiled it for
a 16C558, which is very similar to a 16C58 -- only it works
with PCM. It compiled OK. I installed PCM vs. 3.110 for
that test.
What happens if you don't #org the function ?
The .LST file shows that if you #org it, the compiler always
generates a CALL to the function. At least, it does this with
PCM. I know that your PIC only has two stack levels, and this
might be the cause of the problem.
___________________________
This message was ported from CCS's old forum
Original Post ID: 14030 |
|
|
Sherpa Doug Guest
|
Re: PUTS limitations? |
Posted: Mon Apr 28, 2003 1:47 pm |
|
|
:=:=The following is a set of help messages I want to send out in response to a user query. On the 16C58A address 0600 - 07FF is the last segment of ROM and is empty except for this function. I can send any 3 or 4 lines but if I uncomment more than that I get "OUT of ROM" even though there is lots of space in the segment. Why? Using #separate instead of #org produces about the same result. I am using PCB 3.110.
:=----------------------------------------------------------
:=I don't have PCB, but I took your code and compiled it for
:=a 16C558, which is very similar to a 16C58 -- only it works
:=with PCM. It compiled OK. I installed PCM vs. 3.110 for
:=that test.
:=
:=What happens if you don't #org the function ?
:=The .LST file shows that if you #org it, the compiler always
:=generates a CALL to the function. At least, it does this with
:=PCM. I know that your PIC only has two stack levels, and this
:=might be the cause of the problem.
Since it is only called once the compiler tries to inline it if I don't use #separate or #org, and main() uses most of that segment so I get "Out of ROM". The functions have to be called from main() because of the stack limit.
I tried dividing the puts's into three functions but I get the same result.
#separate
SendHelp1() { //Spew help messages
puts("Fxxxxx<cr> sets frequency to xxxxx Hz");
puts("Bxxxxx<cr> sets burst length to xxxxx microseconds");
puts("Dxxxxx<cr> sets Responder delay in microseconds");
}
#separate
SendHelp2() { //Spew help messages
puts("P1<cr> to enable 1pps pinger mode");
puts("P0<cr> to disable pinger mode");
puts("Only frequencies between 25kHz and 30kHz supported");
}
#separate
SendHelp3() { //Spew help messages
puts("due to transducer limitations");
puts(__TIME__ __DATE__);
Verbose = false;
}//SendHelp
___________________________
This message was ported from CCS's old forum
Original Post ID: 14032 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|