Forgive my picking up the thread here, but the discussion was so deeply nested
I felt that a fresh-ish start was warranted.
I must admit that I'm a bit puzzled by the paralysis the (admittedly poor)
documentation seems to have caused...
About two weeks ago I installed the SDCC rpm on my linux w
On Monday 08 September 2008 05:46:03 Richard Erlacher wrote:
> Actually I haven't used it myself at all. I've used ASEM-51 which is a
> macro assembler, and on my 'XP box it assembles a >4000-line block of ASM
> code into a .HEX file in the time it takes me to remove my finger from the
> key. T
On Monday 08 September 2008 06:32:51 Richard Erlacher wrote:
> You shouldn't let things such as that scare you. If you maintain order and
> discipline within your code, you can do it. ... easily ... and most
> assemblers have no quirks that would "mess you up" as HLL's often do.
> Believe me, th
On Monday 08 September 2008 08:10:24 Dave McGuire wrote:
>
>Good lord, a single source file of four thousand lines?
>
> -Dave
My sentiments precisely.
--
Richard.
PGP Key-id: 0x5AB3D350
"A raccoon tangled with a 23,000 volt line today. The results blacked
out 1400 homes and, of
I don't really see how you can avoid the constant being in the program area,
but personally I would simply do this, below, although admittedly this would
pull in some string manipulation library routines. Whatever you do,
the "Hello\n" string is going to have to be stored somewhere that is not
>From memory, I think the Z80's SP=0 at reset, so the chances are that
initialising of this register is something you're going to want to do fairly
early on in your code.
There are a couple of ways at least of doing this, but I use my own crt0.s
file and the --no-std-crt0 compiler switch. The o
On Sunday 11 January 2009 19:33:10 Kustaa Nyholm wrote:
> Thanks Vaclav,
>
> silly me, the pin was shorted.
>
> I violated the three laws of development work:
>
> Assume nothing, Believe nothing, Check everything, or ABC for short!
>
> Because the PCB was unpopulated except for the PIC and XTAL and
Think of the union as allowing two variable spaces to overlap. To take a
simple case, if you union a two-bye char array with, say, an int, you
actually overlap the physical storage. So, suppose you initialise each of the
two chars with 0x00, and then you read the int, the int will be 0. Similarl
I am guessing a bit, but try:-
STEPPER.brakeDistance = (unsigned long)
((STEPPER.maxSpeed+STEPPER.minSpeed)*(STEPPER.maxSpeed-STEPPER.minSpeed))/(2*STEPPER.acceleration);
Of course, you could declare all the relevant variables unsigned longs and not
bother with the cast.
FWIW, I have had troubl
If you would prefer an EU supplier, then I can think of a couple of places in
the UK...
http://www.maplin.co.uk
and...
http://uk.rs-online.com/
On Sunday 18 January 2009 14:41:18 Ori Idan wrote:
> I would like as a hobby to build a small Robot.
> I am a programmer with little experience in mec
A common error when working with PIC chips is having the watchdog timer
enabled and no code to take this into account. Either you must reset the
watchdog 'regularly' in your code, or burn the PIC with the watchdog timer
fuse disabled. This could explain the apparent "reboot" behaviour?
On Wedne
Hi Folks,
I am using a Z80180 (64-pin DIL) chip with garden variety Z80 PIO, and I don't
seem to be able to coax the PIO into performing any output whatsoever.
To put this into context, I've successfully programmed a Z80 CTC chip on the
same board and it provides me with a very nice interrupt e
I even went as far as replacing the PIO chips with some new ones, so convinced
was I that I was doing things correctly. I wasn't, of course.
The designers of this circuit (I'm doing a reverse engineering job) arranged
the C/'D and A/'B lines the opposite way around to Zilog's suggestion of
conn
It would be useful to know the actual command that you entered...?
I used something like this when I started off...
sdcc -mz80 test.c
the -mz80 tells sdcc what the target machine CPU is and therefore fairly
essential ;-)
On Wednesday 04 March 2009 22:17:22 Matt Baker wrote:
> Hi
> I can't comp
Hi Matt,
I only mention the (Zilog) Z80 option because that's what I've been using
myself lately. Obviously, you'll have to substitute the appropriate option
for the target CPU you're aiming to program. I haven't had any experience
with SDCC for other than the Z80, so I'm rather limited in what
I think this example puts the stack-pointer into HL, doesn't it?
On Saturday 28 March 2009 22:02:04 bob...@comcast.net wrote:
> - candida lopez rodriguez wrote:
> > I need to obtain the PC address (one of the commands that I want to have
> > is dump the registers). My problem is that I can no
A common way of tackling this problem is to use a restart instruction as a
breakpoint, so you replace the instruction you want the breakpoint at with
the restart, and then in your restart routine the program counter can be
popped off the stack. You will have to check the Z80 instruction set
doc
The true "hardware debugger" is a logic analyser I suppose - that's what I
often use. One can see all traffic on the various buses using one of these,
and for 8-bit stuff one can pick them up quite cheaply on eBay.
The other way is an in-circuit-emulator, but that will still use an RST
instruct
I have a bit of a problem with a memory test routine I'm writing.
Consider this piece of code [fragment]:-
Address=&MemoryBlock;
(*Address)=0xAA;
if ( (*Address) != 0xAA )
{ /* We never get here because the (*Address) location is not re-read
*/ }
I can declare the MemoryBlock va
Yes, declaring the pointer volatile seems to have fixed the problem. I did
actually try this before posing the question, but because of another stupid
mistake I mistook the result for something else entirely. :-$
On Friday 03 April 2009 19:32:23 Raphael Neider wrote:
> > Address=&MemoryBlock;
>
I gather from elsewhere that your target is a Z80? If so, you need at least
an '-mz80' on the command line, thus you would use...
sdcc -mz80 putchar.c
On your code - I would comment that you're using a '=' on your if comparison,
you probably mean '=='. I would simplify the pointer declarations
On Monday 03 August 2009 18:03:34 roelof 't Hooft wrote:
> Hi guys,
>
> This is driving me nuts, I have been searching in all the
> obvious places for information on this but still can not
> find what is wrong :
>
> utilities.h:15: error 7: Old style C declaration. IGNORED 'Delay'
> utilities.h:15:
While I don't entirely understand your Makefile (just my ignorance, nothing
else!), but the likely problem is that SDCC can only cope with one source
file at a time, unlike, say, gcc. So, you're probably going to need some kind
of 'for' loop to iterate over each input file. I've been meaning to
In view of the silence on this subject, I'll just tell you about my (few)
experiences of PIC EEPROM programming. I was using the 16F series, but I would
imagine there are similarities.
Programming the EEPROM on PICs, as I understand it is a runtime thing, rather
than a program time (or compile
I'll second that sentiment. I've used SDCC for several Z80-based projects
running on old 1980's equipment, giving it a new lease of life in the modern
world; kit that would otherwise be scrap.
It's relatively memory-hungry compared to assembler (of course!), but memory
is cheap these days!
On
I'm inclined to agree. This list isn't broken, so I cannot see the need to
change just for change's sake.
On Saturday 14 May 2011 07:47:46 Kustaa Nyholm wrote:
> On 5/14/11 09:38, "admin" wrote:
> >Hello SDCC-Community,
> >
> >There is a SDCC forum at: http://develissimo.com/forum/
> >We want it
This is just a hunch, but I wonder if you actually mean this:-
disp_digits="0123";
This effectively assigns ASCII "0" to the first element, "1" to the second and
so on, with a null (ASCII 0) in disp_digits[4]. As you have written the code,
if the array is treated elsewhere as a string, starting
Plain Z80 and Z801800 here. I've had time to forget what I did and why to get
to the extra instructions I needed!
On Wednesday 31 August 2011 10:21:17 Philipp Klaus Krause wrote:
> Dear users of sdcc,
>
> there are many Z80-based architectures out there, and I suppose that
> some of you are writ
If you have access to a counter/timer somewhere, you can sample it at the
beginning of the interrupt service routine and sample it again at the end, and
provided you're confident that it hasn't wrapped around, you can derive the
execution time from the difference of the two samples.
On Friday 0
SDCC has been such a boon to me, I welcome anybody and everyone to the project.
I'm almost ashamed that I haven't contributed much myself beyond the odd
documentation query in the early days, so I'd ask everyone to applaud the
efforts of the developers from time to time.
Presumptuous of me mayb
I'm dredging my memory, but back in the '80s this problem was "solved" by a
pseudo-instruction, LDAZ, meaning load zero-page. I wrote an assembler myself
for the 6502 back in the 1980's, and I seem to recall this is how I did it. I
don't think there's a reliable way of deducing whether a zero-pa
Hi Folks,
I have a ROM image from a Z80-based board in Intel HEX format, and I could do
with a disassembler to unravel some of the code, can someone point me at such a
thing? I've never really needed to use such a thing until lately.
--
Richard.
PGP Key-id: 0x5AB3D350
But scientists, who ough
o look through the results to see
> which ones can take input in intel hex format.
>
> Joel
>
> On Fri, 29 Mar 2013, it would appear that Richard Gray wrote:
> > Hi Folks,
> >
> > I have a ROM image from a Z80-based board in Intel HEX format, and I
> > could
These are just some thoughts that spring to mind, so don't take me too
seriously...
1. Digital output pins on PICS are usually programmable as either inputs or
outputs, and they default to inputs.
2. Most digital IC's, regardless of what they do can sink more than they can
source. So, an LED t
Hi Folks,
I'm sorry that this is a bit off-topic, but if ever there was an audience to
ask this question of, if would have to be here.
Quite a few years ago, I did a project using a mid-range PIC16F84A - mostly
about digital inputs and outputs. The project worked perfectly, but I used a
progra
Hi Guys,
Many thanks to all those that took the time to write-up such hugely helpful
advice with a variety of possible solutions, especially those that took the
trouble to write to me personally. I now have much to investigate and conjure
with!
Thank you so much guys. Off topic as it was, I wa
If I can stick my oar in here... doesn't this make the "unsigned"
directive a bit redundant? If one expected 'C' to be a signed char as
in ANSI C, one would use the 'unsigned' directive in the code. There
is no 'signed' directive as far as I know? This would also cause code
that works today to brea
Hi Guys,
I need a bit of guidance, and I'm certain you guys will have some
experience to point me in the right direction.
I have a little problem at home which I am confident that I can solve with
a PIC16 chip. I *could* solve the problem using discrete logic, but the
component count would be pro
md5sums, or sha1sum or whatever are a special type of checksum. In the past, a
simple addition of all the byte values in any given file would give a simple
total, and typically is/was used to distinguish EPROM contents/versions from
one another. However, a simple checksum is not very robust, one
On Thursday 28 August 2008 12:52:37 Richard Erlacher wrote:
> see below, please.
>
> regards,
>
> Richard Erlacher
> Not quite ... that is, not from the extremely basic level. For example ...
> Assume that I have code that runs in another environment and now I want to
> compile it into an executa
While I'm sympathetic to the cries of inadequate (or sometimes just plain
wrong) documentation, I think this needs to be met with more understanding.
The Open Source development community is comprised of some rather clever
people that are prepared to sit and write useful software in their spare
Hi, er, Richard - apparently we have an uncommon name, so it's doubly weird to
be writing to my namesake!
I completely agree that the methodology (such as it is) used in Open Source
projects leaves a lot to be desired; but it seems to me that despite many
imperfections the Open Source movement
It seems to me that just because Sun (IBM, Novell) etc pay people to develop
and maintain OpenOffice.org (not to be confused with Sun's Star Office) makes
it somehow tainted. It's still Open Source, you can still compile it yourself
if you want to, alter it, etc, etc. Is Ubuntu similarly tainte
stdout (stdin and stderr) are an integral part of stdio.h, so it's as much a
C-ism as a Unix-ism.
I don't know how the Windows environment would cope with this, but under Unix
file-descriptor 0 is stdin, descriptor 1 is stdout, and 2 is stderr, and
these are automatically opened before the exec
On Saturday 30 August 2008 03:51:02 you wrote:
>
> Someone mentioned Code::Blocks earlier. I tried to use it a couple of
> years ago, but when I joined the forum and began asking questions about
> using it with SDCC, I was ridiculed, marginalized and laughed out of the
> process by some of the maj
I begin to see why some British sitcoms don't work in the US.
On Sunday 31 August 2008 15:22:47 Bobby Garner wrote:
> Richard Gray wrote:
> > On Saturday 30 August 2008 03:51:02 you wrote:
> >
> >
> >> Someone mentioned Code::Blocks earlier. I tried to use
Ditto. Seems to be a poor substitute for Unix's (et al) make to me, but for
the GUI addicted I can see it's appeal. GUI's didn't exist when I started in
computing, so I don't really experience much pain doing things the 'old' way
with arcane commands, and it's often much quicker.
On Tuesday 02
Hi Folks,
Somewhat tangential to the hullabaloo going on at the moment about
documentation, I'm bound to say that Zilog's documentation about the Z180 MMU
is perplexing for me at least. For comparison's sake, I looked-up the Hitachi
64180 documentation and that was no more enlightening.
I unde
CYGWIN, I believe, allows some native Linux programs to run on a Windows
machine, as WINE allows some Windows programs to run on a Linux machine. By
native I mean a simple copy of the binary executable file transferred from
one machine to the other. There may well be other shells/emulators that
After a few educated guesses and with the help of my trusty logic analyser, I
have solved this problem.
On Wednesday 03 September 2008 01:44:33 Richard Gray wrote:
> Can anyone set me straight on this, especially bearing in mind that SDCC
> doesn't know anything about the 20-bit ad
I think Dave makes a good point here - I've had to do some hacking to make
anything useful happen, and that has entailed writing several noddy programs
to try things out, but on the whole the experience has been [fairly]
painless.
I suspect that programming OTP chips isn't the place to begin th
Well, I created a nice heap of EPROMS for the eraser in the attempt!
I've ended-up with a reasonably satisfactory result - the analyser tells me my
stack is at the top of memory (17FFF), which is what I wanted. This means
I've got 64K of stack, which seems a bit excessive; but what the hell. My
52 matches
Mail list logo