Menu Sign In Contact FAQ
Banner
Welcome to our forums

Software nostalgia discussion

Yes; I have FatFS in there. Very solid. Just have to watch the usual FLASH wear-out issues (the directory gets the most hits). Not using LFN; that’s for sissies and real coders use 8.3

LWIP and then especially MbedTLS is another story… That stuff would have been almost totally unworkable on a Z80 system.

Administrator
Shoreham EGKA, United Kingdom

On filesystems, for small systems, FatFS is pretty decent. Builds with C compilers that don’t support recent C standards, too – builds with cc65 (6502 variants) and I’m sure it builds with z88dk (Z80 systems) but I’ve not tried the latter. On RISC-V, compiles to less than 32k with long filename support. There’s also a barebones Petit FatFS which compiles to 2k-4k depending on options, and requires only 44 bytes of work area, so will run on some very small microcontrollers (e.g. ATtiny range).

Andreas IOM

Great CPU… I can send you the source to a simple RTOS I wrote for that

1992 was my last time. Developed a complete user-programmable protocol converter, all asm, with a filesystem, tinybasic, Pascal compiler, editor… (last 3 licensed-in).

Administrator
Shoreham EGKA, United Kingdom

alioth wrote:

Incidentally I’m writing Z80 asm at work today.

Wow! Blast from past… Last time I did that was about ~35 years ago…

EGTR

Incidentally I’m writing Z80 asm at work today. We use gnu binutils as the assembler/linker for Z80. A nice distraction from C targeted to run on ARM :-)

Andreas IOM

Usually there are builtins to do this kind of thing, e.g. __builtin_fss to find the first bit set (in GCC). I don’t know for the specific cases you mention.

I did some AVX coding a few months ago and there also you use a bunch of “magic” pseudo-function calls which generate the required assembler.

LFMD, France

Yes; plus asm code is never optimised away, so you can do delay loops – used for nanosecond or microsecond timing to achieve external hardware constraints. In fact optimisation is a big can of worms and changing the level can break stuff even though it should not

Administrator
Shoreham EGKA, United Kingdom

Peter wrote:

So yeah I totally see the argument. But the scene has changed and today, apart from initially loading the stack pointer (and a few bits of task switching code inside an RTOS) one can write everything in C including startup code (zeroing BSS etc), and one should.

Don’t forget syscall wrappers, they also must be written in asm because C has no way of generating an ecall instruction (RISC-V) or ARM svc instruction or x86 int n instruction. This usually means a bit of inline asm and it will be in the libc for the platform, but someone’s got to write it! Also if you want to trigger a software breakpoint (e.g. invalid code path – on RISC-V you can stick in an ebreak instruction, which can’t be done in C… but you’ll only be doing this if you’re working with very low level code).

Occasionally one needs to put a little inline asm into what is otherwise ‘normal’ code – I had to do this to implement something atomically that the compiler wouldn’t – at least not without making system calls (expensive) or call into a fairly large general function in libc (still quite expensive) when a single set of ldrex/strex instructions (ARM) in inline asm around the variable in question would do the job and avoid a syscall. (Yes, we have embedded hardware that’s multi core!)

Last Edited by alioth at 30 May 14:44
Andreas IOM

Peter wrote:

Google MQTT etc and be glad you are 60+ and not 30+ and have to ensure 30 more years of BS

It’s different BS than we had to deal with, but not worse, and not better. I’d be happy to be 30 again!

I set up let’s encrypt on my website https://rv8.ch/ to avoid the complaints, but totally agree that it’s a waste of time. It seems to be automatic, and after the setup, I have not had to do anything. I used to have google ads on it, for no reason other than to learn how it works, and it used to pay me about $20 a month or so, if I recall correctly. I stopped doing that a while back for some reason – probably because Google said I had to have a “cookie warning” – which I chose not to implement. I hate those things.

I fondly recall the days of working with our compiler team in the 80s – we developed one of the early RISC chips which required a dramatic change in how assembly code was generated and optimized. I was far from smart enough to write any of those compilers, but I was pretty good at causing them to break.

Fly more.
LSGY, Switzerland

There are various fashions in IT e.g.

  • for privacy you need https (BS, 99% of the time)
  • for best security, certs should expire often (BS, 99% of the time)
  • you should set up a cron job to keep renewing these short-lived certs (sure, but it breaks from time to time)
  • an http site is dangerous (BS) so browsers issue dire warnings (BS) and scare customers (BS)

There is a real issue: in some years’ time, google may force Chrome to require https-only (stupid BS but google own the world) so those who need http (e.g. for local appliance config) may have to use Firefox etc. This is an ongoing battle. And https (client or server) on an embedded system drives the total code size up by about 300k. I am not deploying loads of IOT boxes which need an https server but I believe there is some convoluted way to do it (without paying for each cert, which would be mad). The fashionable solution is for each device to be a client and you config it via a central server which can then be properly secured on its public interface. AWS and everybody with a dog is hoping to make billions out of providing these services. Google MQTT etc and be glad you are 60+ and not 30+ and have to ensure 30 more years of BS

Administrator
Shoreham EGKA, United Kingdom
52 Posts
Sign in to add your message

Back to Top