Subj : OT: horrible 8086 segmentation To : All From : mm0fmf Date : Mon Nov 25 2024 17:33:37 Raspberry Pi relevance : I'm writing some Pi Pico code I was doing some head scratching when I remembered I'd written something very similar in the distant past to what I was doing. I had to dig through piles of CD-Rs to find the one with the backups on from all those years back. It still reads fine, 21st July 1998 is the date on the CD. 26 years old. Anyway, I've pulled the files from it on to the wee Linux machine for updating and use in the project. There's a date in the header saying "created 1993" and last changes were "16th July 1996". I was just starting to go bald then! I've been rummaging through this old CD-R looking at what I was up to all those years ago and found all sorts of horrible 8086 segmentation management in the C code e.g. " // start of barrel EventRec far* searchp = (EventRec far*) work.bufs; " My eyes! My eyes! That was COMPACT model code, so 64k of code and 1MB of data, code addresses were 16bit offsets to the CS reg and data was far so 32 bits of segment and offset of DS or ES. And of course you had to be extra careful of any pointer arithmetic as a far pointer wrapped after 64k. You had to use slower HUGE pointers to get automatic normalisation. God it was shit. --- SoupGate-Win32 v1.05 * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3) .