Saturday, May 14, 2022

California's Loaded Chamber Indicator

I read the requirements for California's loaded chamber indicator for handguns.   I want pictures of guns that meet this requirement. 

Friday, May 13, 2022

Interesting Jobs

 When I left headhunting, I was 22.  I had a short assignment writing PL/I for something called the Formalwear Information System.  My employer, Telos Computing, had basically decided that I was not socially fit for the office (they were probably right).  Instead of just laying me off, my boss Dick Brewer, who was a heck of a nice guy, assigned me to this contract with Palm Beach Formalwear, who rented tuxedos.  This ran on an IBM System/370 under MVS.  This was a big virtual memory mainframe.  We used IMS as the database, and DL-I as the query language.  (This was a bit odd; CICS/DL-I was the combination more typically used at the time.)  Do not ask me to describe either now.  Ditto for JCL.  We used TSO from IBM 3270 terminals instead of punch cards.  The response time was so slow that we called it turnaround because pressing a key was like almost submitting a card deck to the mainframe.

We only had two terminals and desks for three programmers, so I worked swing shift.  This really turned my day around.  I did what little I did for fun during the day, which simplified many tasks.  Businesses such as dry cleaners had something like banker's hours in Santa Monica.  It also meant grocery shopping at Mayfair on Wilshire Blvd. in the wee hours.  They were one of the few 24 hour markets at the time.  Shopping at 2:00 AM gave a combination of customers weirder than me, and the inventory people wandering the store working for RGIS.  (Little did I know that I would briefly work for them part-time some years later.)

Anyway, the Formalwear Information System (or was it Formal Wear Information System? the acronym was FWIS, I think), was only a few months, and I needed a new job.  I interviewed with a very strange small company, called Futuredata (on the edge of being purchased although I did not know it) building something that I did not fully understand.  But the only offer that I received was from Lexitron out in Chatsworth.  (Chatsworth at that time was the rural northwestern edge of the San Fernando Valley.)  They offered me a decent salary; I think about $30,000 a year.  On the way through HR, some bigwig saw that I lacked a degree and my salary offer became $24,000.  I was miffed, but I had met the girl of my dreams and I think that I had proposed by that point.  We planned on moving to Chatsworth, renting an apartment, and she would continue her education at CSU Northridge.

Lexitron was a division of Raytheon.  They built what was about to become a dinosaur: a dedicated word processing system.  It was a portrait layout screen that provided a nice editing and proofing system.  These were widely owned by big government agencies of the time, which is probably why Raytheon bought Lexitron.

I remember only one project that I worked on during my four weeks there.  My boss needed something textual (perhaps some sort of grammar rules) transformed in some way that was big enough that doing it manually was impractical.  I was handed a tool called Stage 2 that was something that might result from an unhealthy relationship between awk and sed.  I managed to beat Stage 2 into submission.  In retrospect, this may have been my boss seeing if I was up to the task.  I was, to my surprise.

Anyway, GenRad was a big East Coast old electronics company that apparently laid the framework for the oscilloscope (yes, that old) before selling it to a little Oregon company, Tektronix, who found something useful to do with the technology.  GenRad bought Futuredata and with increased funding they made me a decent job offer, about $30,000 a year.  Not having to leave Santa Monica for remotest Chatsworth and a raise made this an easy choice.

This was my first experience of startup wealth.  Paul Page and Bruce Gladstone were President and VP of Futuredata.  Bruce bought a BMW 733i, back when these were signs of wealth, before most of America became rich.  Paul bought two Porsche 928s for himself and his wife.  One red, one white.  Like Bruce's BMW, these seemed like astonishing wealth.

What did Futuredata build?  They made one of the first in-circuit emulators not made by the chip manufacturer.  (Intel eventually trademarked that phrase, so we started selling it as an "in-situ emulator.")  Imagine the microprocessors of that era: Intel 8080, 8085, 8086 (a lot of military projects then), 8088 (IBM PC), Zilog Z80 (most S100 bus microcomputers of the time), Z8000 (Atari's short-lived venture into PCs), MOS Technology 6502 (Apple II), Motorola 6809 and 68000.  How do you load and test software?

You pull the chip out of the socket on your motherboard and plug in our product.  Our probe contained the chip, and the associated hardware kept track of all the microprocessor bus signals.  References to RAM were rerouted to the emulator's simulation memory.  Every signal on the bus was accessible and controllable.  You can set breakpoints to suspend execution when the IP (instruction pointer) reached a particular address, when a particular byte of memory was read or written, you could even examine things like instruction prefetch. 

 Instruction prefetch was one of the ways that processors such as the Motorola 68000 could be so fast.  When it was executing the current instruction, the processor has already fetched the next instruction, determined if it would need to fetch memory contents, and started that operation.  The next cycle was ready to do the add.  The 68000 would sometimes be doing stuff six cycles beyond the current instruction.

We had a gadget called a logic analyzer that would let you watch, record, and stop on particular actions on the microprocessor bus

You could also run on the target processor with simulation memory or vice versa if something was timing dependent.  It was fabulous.  

We had no easy way to force a stop in the 8086.  There was no NMI line (non-maskable interrupt) so we had to force an INT 3 instruction into memory, which forced an interrupt so we could take control of the processor, then restore the original memory contents.  This was a painful effort.  I had code that had to be loaded into memory to do this while an EE sat watching the bus on an oscilloscope to verify that we were successful.

At some point I saw that we had paid an unreasonable amount of money to some consultant to write a disassembler for the 8086 processor.  Disassemblers are programs that looks at the machine code and figure out the corresponding assembly language.  On the Interdata 16-bit minicomputers, for example 4A10 5234 was Add Halfword 1, x'5234'.  Add the contents of that memory address to register 1.  I had written disassemblers before (in high school) so I knew it was trivially easy.

I do not remember which was the first one.  It took about 20 hours, mostly developing a general strategy.  By the time I reached the 6502, it took five hours.  This is all written in Z80 assembly code.  But boy did I have a have a great debugger!

This was the most fun that I had until I started working in startups.  I was working with my best friend (best man at my wedding), and a bunch of fun and eccentric engineers.

Reference manual.

M777 Defending Ukrainian Sovereignty

 


Babylon Bee Again

 For some reason, I cannot embed it.  Still worth clicking.

Babylon Bee Hits It Out of the Park Again

 5/12/22 Babylon Bee:

WASHINGTON, D.C.—Biden tried to warn us. He's been sounding the alarm for weeks now, desperately trying to alert the nation to a grave threat to our national security: ULTRA MAGA. But no one took him seriously, figuring he was just off his meds again. But no—he was actually speaking clearly for the first time in his life.

For lo, a danger to all humanity has appeared above the D.C. skyline: ULTRA MAGA MAN, the final form of dangerous former president, insurrectionist, and taco bowl enthusiast Donald Trump. Having finally absorbed the powers of his defeated haters and all the "sad, pathetic losers" he's roasted over the years, Trump morphed into the most powerful version of himself yet.

"His powers, they're—they're off the charts!" shouted one scientist operating an energy detection device in the streets below. "We've never seen power of this magnitude! We're all going to die! Run for your lives!"

Post-Partum Depression

 There are so many incidents like this: recently birthed mother with no apparent reason for her actions:

Glasgow, Mont. (1945)

05/25/1945: The mother, 26, threw five of her children, ranging in age from 3 weeks to seven years, into a river, then jumped in as well.  Only the 7-year-old survived.

Category: family

Suicide: yes

Cause: mental illness?

Weapon: drowning[1]



[1] "Mother Kills Children, Self," Salt Lake Tribune, May. 26, 1945, 9.

If you know a recent mother (or "birthing person" for those living on Planet Woke, or its dependencies on the coasts) who seems to be having difficulties with the adjustment, make sure that you are there for her (or zer, as the pronoun may be).


Thursday, May 12, 2022

Java

 


I still find it frustrating that what C lets you do with an array of structs requires something this:

ArrayList<ArgTypes> argumentList = new ArrayList<ArgTypes>();
argumentList.add(new ArgTypes("-f", ArgValueTypes.DOUBLE, feedRate)); 
argumentList.add(new ArgTypes("-xs", ArgValueTypes.DOUBLE, xStart));
argumentList.add(new ArgTypes("-xe", ArgValueTypes.DOUBLE, xEnd));
argumentList.add(new ArgTypes("-ys", ArgValueTypes.DOUBLE, yStart));
argumentList.add(new ArgTypes("-ye", ArgValueTypes.DOUBLE, yEnd));

You should not need to execute code for a static array.

And while it is profoundly type unsafe, I miss union.  Unsafe types are dangerous, but fun.

C has a small number of primitive types and operators and a swarm of library functions to do just about everything reasonable; Java has the NATO of classes that once you learn them can make the Galactic Empire run in fear