EDIT MARK record 00
Read the current version at:
https://joelrees-novels.blogspot.com/2026/07/3809-2801-motorola-m6800-exorcises.html
2801
Motorola M6800 EXORcises
| Early Morning Seminary | TOC |
(I'm sure I lost a lot of readers on the shift to the teen romance that never was. And I'm going to lose even more readers shifting back to technology now. At least the tech is real -- for the current chapter or so.)
Nothing remarkable happened in either chemistry class or homeroom. After homeroom, I went to the east student parking lot to meet Rick.
When he saw me, he looked me over with a doubtful expression.
"What?"
"Mmuhhn yeah." He just shook his head. "Let's get to OC."
We both climbed in his car, and he started the engine. Then he looked at me again, wrinkling his nose.
"Hit me with it," I said.
"When you called me last night, were you at Sapphire's house?"
This time it was my turn to be puzzled, while he put the car in reverse, checked his mirrors and the blind spots, and backed out of the parking space.
"No?" I responded.
"I'm definitely getting a whiff of something," he said, as he put the car in drive and pulled out of the parking lot. "Like recent. You're not wearing some strange cologne?"
"Oh." I tested the air around me and chuckled wryly. "Becca and Maralea invited Sapphire to Seminary, so I may have gotten a hug or two from her already today. Yeah, she was wearing perfume."
He nodded, absently.
"You don't believe me?"
"Why would she be going to your seminary?"
"Good question. I guess she likes me."
He laughed. "Well, let's hope that's what it is."
"You could come to seminary, too, you know. I might need an objective point of view."
"Any reason to get me to visit your church."
We both laughed.
"I might have to do that," he complained as we waited for a stop light. The light changed and he accelerated. "Are you're going to help me with the calculus homework today?"
"I did about half of it last night, while I was studying with Sapphire. It's dead simple stuff, just working through some basic area summations preparing to discuss integration."
"Good. I'm glad the class only meets Monday Wednesday Friday, so we have Tuesdays and Thursdays to work on homework in the library."
"Yeah. And I'm wondering if the library has books on microprocessors."
Rick glanced at me. "We can ask. After we finish the calculus homework."
At the college library, we found a study table and set up to study.
"You're right," Rick said. "This is easy stuff."
We both got busy.
After maybe twenty-five minutes, Rick asked, "Done?"
"Just about."
He looked across the table at my work. "Working ahead again."
"Hey. It's fun." I grinned and put down my pencil.
"Says you." He grinned back. "I'll go ask at the desk."
"I'll go check the card catalog."
Rick and the library assistant beat me to the stacks.
"Univac 1100 Series would be mainframe, wouldn't it?" Rick asked in a low voice.
The assistant nodded. "That's what I understand."
I read the spine of a nearby volume quietly, "IBM 370."
"Mainframe," Rick replied. He read another. "PDP-11 series." He reached for the DEC manual.
"I think that's a minicomputer," I muttered.
The assistant nodded in agreement again.
"So not a microcomputer." His hand paused. "Maybe later."
(The LSI-11 implementation of the PDP-11 did exist at the time. But it was not a single-chip microprocessor. It required four chips to function, was very expensive, and studying it would probably have taught lessons of less utility to high-school students than the microprocessors we were talking about in class would teach. It was a significantly more mature class of computer. But it would have been a dream to use.
For the record, the T-11 single-chip implementation of the LSI-11 was still several years away.)
I responded with a non-committal "Mmm hmm."
The library assistant pointed out a sign on the shelf I was looking at. "Just a reminder, these are reference works, and can't be checked out."
Rick and I both nodded our acknowledgement.
"Understood," I said.
"8080 -- Intel. Repetitious cover. RCA 1800? oh, COSMAC CDP 1802. F8? What's that?" Rick picked up a Fairchild manual.
"And these don't fit on the regular shelf." The library assistant pointed out the oversize shelf.
"Ah, 6800," I said as I picked up the Motorola M6800 Programming Reference Manual from the shelf she had just indicated.
"Do you think you'll find everything okay?" she asked.
"Probably," Rick responded as he thumbed through the F8 manual. "For now. Thanks."
"The technology department has requisitioned manuals for a few more this semester," she volunteered. "the, uhm, Western Design Center 6502 and a couple of Texas Instruments microprocessors."
"9900?" Rick asked.
"I remember that one," she answered. "They seem to be really new products."
"They are," I confirmed.
"If you give me your names and phone numbers, we can let you know when we get them."
We did so, and thanked her again, and she returned to the checkout counter.
Rick and I flipped through the manuals we had picked up.
"Wow." Rick muttered. "The F8 looks even more primitive than the 1802."
He put the Fairchild manual on the returns shelf. "Maybe later."
"The explanations of the microprocessor instructions in this manual look pretty detailed." I handed him the 6800 Programming manual I had picked up.
"For me?" He gave me a lopsided grin.
"Unless you don't want it."
He opened it up to a random page.
I grabbed the M6800 Microprocessor Applications manual that had been next to it on the shelf. " I think I'm going to go sit down."
"Good idea."
We went back to the study table.
While Rick flipped randomly through the pages of the Programming manual, I opened the Applications manual to the table of contents and started scanning it, subvocalizing the sections.
"Addressing modes, instruction set, pointer operations, branch and jump, looks like it repeats or summarizes a lot of the information in the Programming manual. Hmm. Plus the electronics side of things."
Rick didn't say anything, just continued flipping through the pages.
"Code examples. Addition and subtraction routines, multiplication and division, counting. Chapter two, section one point five."
I opened to section 2-1.5 and read in a low voice to myself.
L-D-A-A ALPHA ; Maybe, load A ALPHA?"
A-D-D-A BETA ; Add A BETA?
S-T-A-A GAMMA ; Store A GAMMA?
I explained to myself, "I guess that means GAMMA = ALPHA + BETA, if GAMMA and ALPHA and BETA are all bytes. Load the left side, add the right side, store the result. And it looks like the same sort of thing for subtraction."
"Hang on," Rick said. "There's an appendix that has a description of the instructions. Let me see." Rick flipped pages. "L-D-A loads the contents of memory into the accumulator. And," He flipped pages back. "ADD," he read in English instead of reading each letter, "adds the contents of A-C-C-X and the contents of M and places the result in A-C-C-X. A-C-C-X means accumulator A or B?" He turned the Programming Manual so I could read the page.
"Mmmm -- immediate, direct page, indexed, and extended mode operands for each of accumulators A and B. Sounds right."
"And M is memory?"
"Apparently."
"Okay," he pulled it back and flipped pages forward. "S-T-A stores the contents of accumulator X in memory. The contents of accumulator X remain unchanged. I guess I can follow that. Not that I know what to do next."
"Add with carry?"
He flipped back a few pages. "A-D-C. Right here."
"It's a start?"
"I hope so. Hmm." He flipped pages back and forth.
"What?"
"I don't see any ADD to X instruction," he replied.
"Increment?"
He flipped pages. "I-N-X. increment X. Add one to X."
"Maybe it has to be done in memory and then loaded into X. Hang on, there are some tables of instructions here." I flipped back a bit. "Not this one." I flipped back a bit farther. "Accumulator and memory, ah, index register and stack pointer operations. Compare, decrement, increment, load, store, transfer between the stack and index registers. No add or subtract, so it looks like we have to add in memory and then load it. Or if it's quicker, use more than one increment or decrement instruction."
"Sounds like a lot of work."
I flipped some more pages. "I'm going to copy some of this out." And I got a sheet of loose-leaf paper out of my notebook.
"Copier over there?"
"Nah. I don't want the whole page, and the manual isn't going anywhere. And I think I might remember it better if I copy it."
I copied the very short sequences for adding and subtracting multiple bytes while Rick went back to paging through the Programming Manual.
After a few minutes, I said, "I think I'm going to take a guess at how to add B to X," and wrote down,
STX X16
Rick read, "Store X in X16. How do you know there is something called X16 that you can store X in?"
"I'm sure one of these manuals explains that."
"You're making it up."
"For now. Uhm,"
ADDB X16
"Mmm, how do I do this?" I flipped pages in the manual, looking at the sample code. "Oh, this would probably work."
ADDB X16+1
"Add to accumulator B from X16 plus one," Rick read. "That would be one memory location beyond X16?"
"I think so."
"Your have B reversed from the example."
"I wonder if it matters."
Rick give me a "Who knows?" shrug.
I continued. "If it doesn't,"
LDAA X16
ADCA
Again I got stuck.
Rick suggested, "Just adding zero along with the carry might work?"
"Genius."
"Huh."
"Constant is immediate mode, and that uses the, uhm, pound sign." I continued,
ADCA #0
STAB X16+1
STAA X16
LDX X16
Rick read, "Load accumulator A from location X16, add carry immediate zero to A, store B at one beyond X16, store A at X16, and finally load X back in from X16."
We both stared at the code for maybe half a minute.
"Sounds good, but I wonder if you could clear A and add A from X16 instead?"
"I wonder what would happen to the carry flag. Wait." I flipped back, looking for a table that had the load instruction in it.
Rick flipped forward a bit.
"C-L-R clear," he said. "R stands for reset. Clears the carry flag."
"Maybe you could clear A first." I read from the table I found, "But loading the accumulator does not affect the carry flag."
"So that sounds like your sequence should work. That's a lot of work to go to every time you want to add B to X."
"There's got to be a way to avoid repeating that every time."
(There is a way to avoid repeating the code, of course, but that's for them to discover later. And what they came up with is not the most optimal, but it's pretty good first efforts. Way better than I and my friends in the reality you know could have done.)
"I think I'm going to look at decimal adjust later," I commented to myself. "I wonder if carries are the same for decimal and binary."
Rick gave me another shrug, and I turned back to the manual and continued reading.
"Hmm. It looks like they're saying that standard multiply by column works for binary like it works for base ten, but we knew that."
"You knew that."
"You did too."
"You told me about it once."
I continued browsing. "Booth's algorithm? I wonder what that is."
I turned a querying glance at Rick, and he returned a shrug.
"Maybe I'll copy this out later, too."
I went back to the table of contents. "DMA -- direct memory access."
"I wish I could make as much sense out of things as you do," Rick complained quietly, as he flipped pages.
"What do you mean. You are making as much sense out of it as I am. Huh." I stopped flipping pages. "Scanning wand, UPC symbol."
"Wand?" Rick grinned.
"Magic, I guess."
We laughed. Quietly.
"Chapter six, design techniques. This looks like it might make a good textbook for our class. Hardware/software tradeoffs, hardware configuration, what's macro flow?"
Rick set the Programming manual down and moved around to my side of the table so he could get a better look.
I continued scanning the table of contents. "Chapter seven, development tasks." I continued silently to the bottom of the page. "Any idea what 'build virtual machine' means?"
"No idea." Rick shrugged and read the next entry, a little loudly. "The EXORciser?" He started humming the signature opening phrase of Mike Oldfield's "Tubular Bells", and we both laughed out loud.
We heard a shush from the checkout counter. I looked up and gave the library staff a thumbs-up, and the librarian who had helped us gave me a mock stern look, but with a real warning behind it.
"For getting the demons out of our designs?" I suggested, more quietly than before.
We both snickered. I glanced back to check with the librarian at the desk. She rolled her eyes.
"Chapter seven, page sixty-nine." I flipped to the specified page. That page had an image of a rather non-descript box. The swept-back front panel with an exaggerated lower lip might have been an attempt to make it look futuristic or something. The left three-quarters was occupied by a blank inset, and the only controls were to the right of the inset -- a keyswitch between two pushbuttons, with three indicator lamps, probably LEDs, above the controls, and the EXORciser logo above that.
Rick shook his head. "Looks kind of like a squashed toaster oven."
"No blinkenlights?" I turned the page. "Seventeen inches wide, nineteen deep, seven high. Forty-five pounds." (43.18 cm by 48.26 cm by 17.78 cm; about 20.412 kg.)
"The Altair 8800 looks a lot more interesting, what with all the switches and lights on the front panel."
"I wonder if we could put that kind of front panel on this."
"I wonder how much it costs, and what you can do with it."
"I don't see any indication of prices. I might have asked about that in my letter of inquiry, if I had read this first."
"Maybe they'll send you a price list anyway. I'll bet the SWTPC will be cheaper."
"Different purposes, probably."
"Yeah, I think we need to know more about what these gadgets do before worrying about prices."
We scanned more of the chapter without comment until Rick looked at his watch.
"Time to go for lunch."
"Whataburger?"
"Yah."
We put the manuals on the returns shelf, thanked the library staff on our way out, and headed north in Rick's car for the Whataburger down the road.
"Onions today?" Rick joked as we pulled into the drive-in.
I chuckled. "Is that relevant?"
But I think I did order onions, lettuce, tomato, pickles, and cheese, with ketchup and mayonnaise. I usually did. Rick probably ordered grilled chicken with mayonnaise sauce, per his usual.
We talked about math and electronics while we ate, and then headed for Permian.
| TOC | Next | |
| Where it starts |
Copyright 2026 Joel Matthew Rees
No comments:
Post a Comment