The Novels

Economics 101, a Novel (Rough Draft) -- My first sustained attempt at a novel, two-thirds finished in rough draft, and heading a little too far south.
What would you do if you and your study partner, with whom you had been seriously discussing marriage, suddenly found yourselves all alone together on a desert island? Study economics?
Sociology 500, a Romance (Second Draft) -- The first book in the Economics 101 Trilogy.(On hold.)
Karel and Dan, former American football teammates and now graduate students, meet fellow graduate students Kristie and Bobbie, and the four form a steady study group.

Featured Post

Sociology 500, a Romance, ch 1 pt 1 -- Introducing Bobbie

TOC Well, let's meet Roberta Whitmer. Bobbie entered the anthropology department office and looked around. Near the receptionis...

Saturday, August 1, 2020

Notes: 33209: Straits -- Proceeding Forth

Notes for https://joelrees-novels.blogspot.com/2020/08/33209-straits-proceeding-forth.html.
May contain spoilers, both real and false.

Chapter 13.5 Straits -- Exercises, Exercises

Chapter 13.6: Straits -- Proceeding Forth


Tanya looked up from her keyboard control board. "How long do you think it will take them to get us those Micro Chromas?" Julia and Bob were helping her debug her work.

The rest of us with working keyboards were spread out helping those whose keyboards were not yet working.

Julia looked over at me and said, "Do you think they'll have them Friday?"

I blinked and she winced. She mouthed a silent "Woops", and I gave her a wry smile and a wink.

"Denny didn't say."

Julia wants to take her car to Austin? In Exercises?

Julia and I already know she might want a serial interface for the keyboard, we can start in the lab talking about it, and about options for the physical port.

The big box with EXORcisor bus and disk drives leads to the trip. (This is Wednesday.) Need to get Mike in the same car with us going to Austin?


"Dad really thinks I should build the computer as one box for the circuit boards and disk drives, with a separate keyboard and display."

In the lab after classes, we were discussing our next steps while we helped those whose keyboards were not yet working.

Julia and I had met at Dad's offices after classes, and were on our way to the lab.

 "Since the display is connected to the computer by an antenna wire, I guess we already have the separate display."

"If it's a separate keyboard, I guess that flat ribbon cable won't work very well."

"Too stiff. Too easily broken."

"Yesterday we talked about a serial port for the keyboard. Does that have something to do with it?"

"If the keyboard interface is a serial port, we don't need as many conductors. We could even use coiled telephone handset wire for the keyboard."

"Like the wire between the phone base and the handset?"

"Right."

The ribbon cable for the keyboard isn't very 


 This morning, Dad insisted that I should look again at a separate keyboard."

We were on our way to the lab after classes.

"Yeah?"

"The ribbon cable for the keyboard will break if we do that, won't it?"



 In the lab after classes, those whose keyboards worked helped those who didn't have theirs working yet, and we tested them on the computers and explored the monitor ROM as we went.

Discussion turned to the next steps.

"How long will it take to get the rest of the Micro Chromas?" Tanya complained.

"Joe, do you think they'll have those ready on Friday?"

I looked over at Julia where she was helping Tanya, and she gave me a "Woops! Help?" look.

"I should have asked Denny. He didn't mention it."

"Friday?" Wallace asked.

Julia looked down at Tanya's keyboard, and I looked at the chalkboard.

Suzanne's intuition must have kicked in. "What's happening Friday?"

Julia and I looked at each other again. She tilted her head in resignation and I shrugged.


"Just heading down to Austin to see if we can find disk drives for my computer."

"Just the two of you?" Suzanne probed.

"Ditchin' the rest of us?" Wallace complained.

"There's definitely not enough room for everyone in our group at my brother's house. Barely room for Julia on the front couch and me on the floor of my nephews' room."

-----------
 Also, Julia gets the couch in my brother's living room, but he really doesn't have room for anyone else, so you'll all need to make your own plans about where to stay for the night."

"Julia and I are heading down, literally as soon as our last classes end."

"Ohhh!"

"She's going to sleep on the couch
------------

"Oh, yeah. You'll both be on that couch in the morning, is my bet," Torrence jested.

"Not with my brother and sister-in-law watching, or we wouldn't be doing this."

"Uh, huh, sure!"

"Hey, look, if some of you want to go check out the surplus shop down there, you could leave at six in the morning, and we could meet you at the state capitol building or Barton Creek, or UT, or someplace everyone knows. Or the highway turnoff closest to the shop, if everyone going knows the city well enough."

That moved the conversation away from dangerous places, and Julia and I exchanged relieved glances while we participated in the discussion of who could change their plans on such quick notice and where we could meet.

Mike caught my eye and gave me a look of disappointment.

I shook my head, but he turned away.

From there, discussion moved to enclosures.

"Doctor Brown," Javier asked, "Do you think we could borrow tools from the school?"

"I've been begging the teachers in charge, but they don't none of them seem to be in a very cooperative mood."

"I'll bet that surplus store has some pre-built boxes to look at," Jeff suggested.

"Now that you mention it, I wasn't looking for them, but there were some enclosures."

We had about half the keyboards working by the time I had to go take care of my newspaper route, and we called it a day.

After I threw the newspapers, Julia and I sat down and drew up better plans for a box like mine, under the assumption that the computer would either be a typewriter or a utility tool for her. And we drew up tentative plans for an enclosure for the disk drives, both for mine and for hers.

And Julia said she was hungry, so we stopped and put something quick together for dinner. Then we called Denny to ask about the Micro Chroma 68 kits, but he said he hadn't heard. And we practiced for my recital for about twenty minutes.

"What now?"

"I need to study the 8086 and the 9900 a bit more. But I also need to figure out that Forth stuff."

"The stuff you ordered, that you were looking at when we both fell asleep night before last?"

"That."

"I think you should do it now."

So I got out the package and looked through it again. I had ordered a printed copy of the fig-FORTH FOR 6800 ASSEMBLY SOURCE LISTING (pink cover) and a copy of the source on tape, a copy of the fig-FORTH Installation Manual, Glossary, and Model (baby blue cover), and a copy of the introductory textbook, Leo Brodie's Starting Forth.

I picked the Baby blue cover Installation Manual up again, but I thought about it for a moment, and without any good reason put it back down. Instead, I opened up the Source Listing. This time, I fairly quickly found the I/O routines to customize, so I loaded the source into the Micro Chroma from tape, saved a copy of the original to disk, edited the terminal I/O routines as suggested, to match the Micro Chroma 68's hardware, and assembled it.

Julia watched me patiently.

I had to correct some typing mistakes, then I saved the binary file to both disk and tape, and loaded and ran it. It came up nicely, first time.

FORTH-68                         
  OK                                     
                                             

Julia went in to ask Giselle if she could borrow her TV, and Giselle came out to watch as she loaded the binary from tape into her Micro Chroma 68+6801 and ran it. It came up nicely for her, too.


For a half hour or so, we played with the examples from Leo Brodie's book, then I let Giselle play on my computer while I went back to the manuals to try to understand what Forth was all about.

The parameter stack, I understood, but the virtual machine was Greek to me.

"No decimal point," Giselle muttered.

"I think Joe is going to have to program that himself."

"Probably so," I agreed.

"Making your own words is fun." Giselle grinned. "Can we make this work with my word processor?"

"I think I'd have to rewrite the entire interpreter." I showed her the pink program listing.

"It'll take some time?"

"It'd take some time."

(Forth took the real me another six months or maybe a year and a half to get running. I did it the wrong way, hand assembling the source and entering it in hexadecimal, also by hand.

It was a revelation, but I'm not sure it wasn't a revelation of the dark arts. The power you felt back then when you write your first BASIC program could be a little intoxicating. The power you felt with Forth was more direct, stronger, more full of promise.

But the details of implementation still bit you in the end, and they bit in ways that the majority of programmers and software engineers, unfamiliar with Forth, did not understand.

The me in this story was immune. Giselle was not, but lack of floating point math buffered the effects. Julia wasn't immune either, but I think she mentally hid herself behind the me of this story.)

Thursday's lab was a mix of getting the rest of the keyboards working and letting other students play with Forth. None of them seemed to know what to make of it.

Thursday evening, Giselle, Julia, and I went to Institute again. It was a better lesson than the last week, and Julia said it answered some of her questions.

We played with the postfix syntax, and discussed 

 the program listing for Forth.


By Thursday afternoon, we had all the keyboards working. Some of the students were working on plans to turn their controllers into standalone trainers, and others were working on plans to




Planning enclosures while finishing keyboards and working on trainer designs.

Discussion of whether to build more Micro Chroma 68+6801s

Exorbus

Running Forth

bank switching, 8086 segment offsets



Mention of the trip to the surplus store for disk drives, everyone plans to go, plans for picnic?
Framework makes debouncing easy
Having to use the anodes port for the column strobes? Add one-of-eight selects instead?
Using the interrupt input for system request



****

"We want to be able to have the CPU do other things besides display numbers, so we're going to use the timer built into the 6805 to count instead of having the CPUx count, and we'll have the timer interrupt the program to actually display the numbers."

"Is this only for displaying numbers?" Tanya asked in a slightly petulant tone.

"Well, the numbers might mean things. For instance, if something goes wrong during boot, we could put an error code and an address on the display, to give clues about the error state. Or we might say that a blank display is an all-operational status."

I can tell your eyes are glazing over now, so, rather than walk you through it with us I'll just note that we read in the manual about the timer, and I walked them through initialization, using the pre-scaler to set the granularity, calculating the value to initialize the timer and pre-scaler to interrupt the CPU once every millisecond, and constructing the interupt routine to display the digits one place at a time.

Someday, somewhere in my blogs, I'll show the complete keyboard debounce and status display routine, complete with display suppression and other features that we evenutally added. Suffice it to say that we had Julia's status display functional at a usable level on Monday before I went home to deliver newspapers, and that about half of the group had theirs functional by the time I got back.


Tuesday I explain that we need more computers running, so Julia's is not just Julia's. Then we forge ahead into the keyboard decoding.

Wednesday, while students are catching up, Julia, Mark, Jeff, Winston, and Suzanne dig in and get their computers ready for RAM, ROM, burners, disk controllers, etc., while I study the Forth manual and the TMS 9940 datasheets.



Which is what we did. Again, Doctor Brown let them work while I was delivering my newspapers, and Julia, Mark, and Jeff helped those who needed help with the tools on the Micro Chroma 68.

About half of the group had their display routines working well by the time I returned to pack things up.

From Monday to Wednesday, in lab, I let the others work while I helped Julia program her keyboard controller. Someone was watching over our shoulders as we worked, and the structure of the code made the rounds -- the interrupt handlers, the state tables for the keyboard matrix, the translation matrix for the LEDs, etc.

Bob and Jennifer pretty much got it worked out for themselves, and we compared notes.

Mark, Jeff, and Mike picked up what we were doing, and also had their keyboard controllers working shortly after Bob, Jennifer, and Julia and I had ours working.




It's tempting to go into great detail on the keyboard decoding and the status display. Maybe, one day, I'll write a book on how to do it with parts you can buy now. 6805s are kind of hard to get now. (It would fill an entire book, yes.)

I'll note that I walked the group through several ways of keeping keyboard state for use in debouncing. Some of the students understood when I






Pascal, book of Ether, keyboard with Julia
Ed Snyder's black stealth keyboard

monday
Julia and I work out the keyboard and seven-segment status display
class also progressing, work on 68705 trainer monitor
home evening with Julia's family and missionaries, second discussion,
recital practice every evening all week

tuesday, wiring Julia's with memory switches, DMA controller, ROMs, full RAM
continued work on trainer monitor
communicating with TSC about drivers
(evening?)

wednesday,
Julia's EPROM/MCU burners, my daughterboard starts
class continues with trainer monitor, etc.
her scripture study group

thursday,
diagramming,
first peek at forth
class completes trainer monitor.
our institute

friday,
trip to austin
meeting with motorola, Julia asked to join
discussion of
-- floppy controllers
-- 2801 address spaces, I/O based memory banking, call stack cache
-- RISC concepts
-- 2809 similar to 2801
-- 31609 with 32 bit addressing
-- 38000 with stack caching

saturday
Julia's disk drives

(Nos) besaremos cuando y como queramos.
cuándo y cómo

Trip back, too much heavy kissing, discussion of information sharing?
Managers and bishops who don't know what to do with information that comes up.

(In notes for bringing up flex:)

Denny called about the time we were wrapping up, and Julia got on the extension in Dad's study to say hi. It seemed it would be appropriate to make a run to Austin the next weekend, and to leave immediately after our last morning classes so I could visit with some of the management at Motorola Friday evening.

"You, know," Julia said, "if I went with, maybe I could look for floppy disk drives at that surplus shop on Saturday before coming back."

Denny checked with Denise, and they decided Julia could sleep on the couch in the living room and I could sleep on the floor in a sleeping bag in the boys' room. Julia's parents said they thought it would be okay, and Mom and Dad suggested we pray about it.

Which we did. No one felt inspired to object, 

Julia suggested she go with me, so she could go looking for her own disk drives.


Talk about duty cycle and mention DtoA as a way to adjust brightness.


Julia returned to working on her keyboard/trainer, while I dug back into my test routines. 


Watching the students work on the keyboard and keypad matrix decoding,  became clear to me that, while the bit I/O instructions might be useful for certain singular, non-generalized kinds of code, a keyboard or keypad matrix contained a lot of repeated elements. Ultimately, shifts and logical instructions would provide the more general scalable solution.

I stood up and demonstrated the concept of a state array for the matrix, then suggested we put it on a back burner and look at the seven-segment LED displays. This time, the bit I/O instructions were ignored, and several groups formed around defining an array of the segment patterns for each integer. Some of the students wanted to turn the translation array upside down for some reason, but I didn't stop them.

Suzanne's and Winston's and Winston's mainboards were both up enough to display the TV-BUG prompt by this point, and the four of them joined the rest on the keyboard/trainers.

It's tempting to go into great detail on the keyboard decoding and the status display. Maybe, one day, I'll write a book on how to do it with parts you can buy now. 6805s are kind of hard to get now. (It would fill an entire book, yes.)

I'll note that I walked the group through several ways of keeping keyboard state for use in debouncing. Some of the students understood when I


Since Flex was running on my Micro Chroma 68, I was able to load the cross-assembler, and we had several students burn code into their 68705s for testing before time to shut down.

Mike kept trying to work out how to set the keyboard state up as an array, but he couldn't seem to quite pin it down.

I shook my head, and she led me out the back door. There was a large tree with a tire swing

I guess there were no surprises on Sunday, unless you would consider it surprising that Pat and George attended Julia's congregation again. They slipped out before we could talk with them. We didn't see Mike.

Or you might consider it surprising that Julia and I joined the choir in my ward, preparing for Easter Sunday. No?

I suppose it would be no surprise that Julia insisted on calling Denny and Denise to ask if there were room for her to stay overnight Friday. With a bit of discussion, it was determined that she could have the couch in their living room, and I would roll a sleeping bag out on the floor of the boys room, and both our parents approved that plan.

That Sunday was about as one might expect, I think. In the morning, I visited Julia's congregation. Pat and George came and sat in the back. Mike slipped in before the sermon started, and all three slipped out before we had a chance to talk with them.

In the afternoon, Julia visited mine. This time, she joined our choir practice in between meetings and young adult family home evening.
I told her about needing to go to Austin before her meetings, and by the time we were finished with mine, she had decided she was going with me.


"Floppies multiplying like rabbits," I grumbled.

She laughed. 




tendency to idealize/idolize foreign



Chapter 13.7: Straits -- what?

[Backed up at https://joel-rees-economics.blogspot.com/2020/08/bk-33209-straits-proceeding-forth.html.]


No comments:

Post a Comment

Keep it on topic, and be patient with the moderator. I have other things to do, too, you know.