Monday, January 13, 2020

33209: School -- Classes

Chapter 2: Christmas Present -- Micro Chroma 68

Chapter 3.0: School

"Professor Crane?"

Professor Rusty Crane looked up from his desk. "That's me. What can I do you for?"

"Doctor Brown over in the electronics and controls department said I should talk with you and Professor Bright."

"Joe Reeves. Your dad talked to me on the phone this morning." 

I turned at the voice behind me, to see another professor coming up the hall.

"Ah. Professor Reeves's son," Professor Crane responded. "You do look like your dad. Sorry I didn't recognize you. Come on in and let Thom through."

I turned back and Professor Bright followed me in.

"I have permission," I began, "from the school counselor and Doctor Brown, if it's okay with you two, to substitute a BASIC programming class for one of my electronics classes."

Professor Crane grinned. "We'll take all the warm bodies we can get."

Community college classes often fail to make, even in the semesters they are offered, for lack of enrolled students. So there's a bit of a running joke about accepting anybody alive and willing to sit through the lessons.

Professor Bright added, "But from what your father says, both of us expect a bit more than a warm body."

I wondered how much Dad had already told them.

"I've had a sort-of an introduction to BASIC. We used it a little in my industrial electronics class at Permian several years back, on an Altair 8800."

"Hard core!" Professor Crane nodded enthusiastically.

"And I played with it a bit on the TRS-80 model when I was doing sales at Radio Shack about three years ago."

"Oh, yeah, the Trash 80." Professor Crane nodded. 

Professor Bright cocked his head. "Now it isn't really totally trash."

"When it runs. Those floppy disk drives are finicky."

I sighed. "I know about that. I worked as a tech for Radio Shack for a while, and aligning those drives was hard. I think the newer models are better, though."

"Your dad said you're building a computer," Professor Bright prompted.

"Yeah. It has a 6800, not a Z-80 or 8080. No floppies. Yet."

Professor Crane raised his eyebrows and Professor Bright just nodded.

"It'll have a BASIC in ROM and I want to be able to program it when I get it wired together." 

"Not unreasonable," Professor Crane nodded.

"And we can probably help you with that," Professor Bright said.

"Since I'm familiar with the syntax, I'll have a bit of a head start, and it shouldn't be too much of an extra load, shouldn't eat up too much of my time." 

Professor Bright narrowed his eyes. "You will need to keep an eye on that." Then he grinned. "But we'll trust you to judge that for yourself."

We discussed my interests and plans for a few minutes more.

"You know, you can always switch from electronics to electronic data processing," Professor Crane suggested, half seriously. 

Electronic data processing was what many technical colleges used to call information technology.

I gave him a lopsided grin. "I need to keep focused." (And the real me wishes he'd been smart enough to keep focused enough to finish the associate's degree in electronics instead of switching to EDP.)

With permission from both, I added the BASIC programming class to my winter schedule.

*****

A shadow fell across the curtains in the living room windows and I looked up from where I was lying on the floor with my legs propped up beside the wall heater, reading Tera he. The doorbell rang.

"Coming."  I rolled to my feet, leaving the book face down on the carpet.

I opened the door to find Julia standing there wrapped in her overcoat, carrying a folder packed thick with papers.

"Hi, Joe."

"Julia. Come on in." I opened the screen door for her.

She hesitated. "I just brought some test papers over for your da-- uhm, for Professor Reeves." 

"Well, get in here where it's warm." I opened the screen door wider, motioning her in, and looked over my shoulder toward the kitchen doorway. "Dad!" I called out. "Julia's brought some test papers over."

Julia gave me an embarrassed look, but came in.

"We always call across the house. It's no big deal. I'll go see if he heard. Have a chair." I motioned towards where the rocking chair, sofa, and big chair were lined up across from the heater and went to the doorway between the kitchen and the living room. 

As I entered the kitchen, Dad appeared in doorway at the far end of the kitchen and grinned at me, so I turned back as Julia sat down somewhat timidly on the edge of the rocker.

"He's coming," I went over to the heater to pick the novel up. "I was relaxing with a book in front of the heater."

"I see."

Dad came in. "So you came to visit us?" He welcomed her with a big smile and an outstretched hand.

She laughed and stood to take his handshake. "Just brought over the essay questions I was working on."

"Bien, chica." They exchanged a hug."Muchas gracias. ¿Cómo fueron?"

"Well, actually, there were a few that I wasn't sure how to grade. I left notes."

"Do you have time to show me now?"

"Uhm," again she hesitated. "Sure." She glanced over at me, not quite meeting my eyes.

Dad and Julia sat down and started discussing students' work, using the coffee table in front of the sofa as a desk. I sat down on the other end of the sofa and opened the novel to continue reading.

Giselle came in with a book and sat on the big chair next to where I sat, and Dad looked up. "Julia, I don't believe you've met my daughter Giselle."

"Hi, Giselle."

"Hello, Julia," Giselle answered, nodding earnestly, watching. "Don't let me interrupt."

Julia shook her head. "I'm the one interrupting."

"Nonsense," Dad replied. "Let's see what you've got."

After about five minutes, Dad sat back. "Thank you for your hard work."

Julia leaned back, too. "Thank you. I'm glad I can help." 

"How've the holidays been?"

"Oh, the usual. Family. Presents. Reading the Christmas story. And working on these."

Giselle spoke up. "Reading the Christmas story is a good idea." She nodded meaningfully.

Dad and I looked at each other. 

I nodded. "We haven't done that this year. I think we should do that tonight." 

Dad nodded in agreement.

"We could do it now," Giselle pointed out. "I could get Mom, and Julia could join us."

Dad and I looked at Julia, and she nodded in surprise and agreement, so Giselle stood and went to get Mom.

"I didn't mean to interrupt your family holidays."

"Noo problemo," Dad shook his head with a grin. "If you've got time, I think we've got time."

I nodded in agreement again. "Yeah. And there's a small possibility we could forget if we wait until the evening."

"But you're reading your book."

I held the novel up. "Future science fantasy with extra-sensory perception and psychokinesis and such. Kind of like Orson Scott Card meets Robert Heinlein meets Andre Norton. It's not nearly as important, not by a long shot. Besides, I've been at it an hour, so it's time for me to put it down anyway."

"Oh?"

"If I don't set a time limit, I tend to get lost looking up words and trying to decode grammatical details, and then I lose track of the plot."

"You don't look up all the words you don't know?"

"I was doing that all last month, but about Christmas day I realized I had spent more than twenty hours a week on it and hadn't gotten past the third page. And I kept forgetting everything I had studied the day before and going back. So now I avoid looking up words if I can possibly follow what's happening, and I limit my time to an hour a day, max. Progressing much better now, and remembering things better, too. Mis-remember a lot, but remember much more."

(The real me took six full months to come to this conclusion, even though I theoretically understood the principle before I started the novel. That's an example of how experience excels knowledge.)

"Oh."

"Kanji are difficult to look up, too."

" You're reading it in Kanji? Isn't that hard?"

"Yeah. Sometimes I get lost looking up just one word, and when I stop to check the clock, two hours have gone by."

"Two hours?"

"If I recognize a reading, I can use a phonetic dictionary and look it up by the kana, and that usually goes pretty quick."

She tilted her head as Mom and Giselle came in and sat down.

"Don't mind us," Mom said. "We'll wait. Why don't you show us how you look those up, Joe?"

I went and retrieved a couple of my dictionaries from my room, and opened them up on the coffee table.

I pointed out a word in the book. "Here's a word I don't remember. But I can guess it reads 'sei-shin'. So I try looking it up in this dictionary that organizes the entries phonetically, by kana. Here's the さ (sa) group." I thumbed through the pages. "さ,(shi),(su),(se),(so). Back up to せ, followed by い (i). It's pretty near the the front of the list in kana order. And there it is. 「星辰」." I scratched my head. "Hoshi. It seems to be just another word for 'star'." I kept reading. "Something about invoking the mysteriousness of stars." 

I chuckled. "Now, see, I could get lost in digging into this one definition pretty easily, even though finding it was pretty easy."

"I think I can see that." Julia raised her eyebrows and nodded, and Giselle and my parents echoed her agreement.

Then Julia frowned. "So if you don't recognize a, what is it? Word? Uhm, letter -- character? Then what?"

"That's what I want to know, too." Giselle said emphatically.

Mom and Dad chuckled.

"This dictionary is in radical-stroke order."

"Radical stroke sounds like some sort of politics." Dad joked, and we all laughed.

I continued, still chuckling. "The ideographs are composed of parts that are called 'radicals'." I was not yet aware of the term logogram, so I used the less general term, ideograph. "Radicals are composed of strokes." I drew a few basic strokes in the air, the vertical stroke, the horizontal stroke, and a top-right corner stroke. "So I count the strokes. Hmm. Let's try this one." I pointed out the character 「獅」 in the novel. 

"There're three vertical radicals in this one. The one on the left is kenbu, or kemono-hen, and it has three strokes." I drew the radical on the tabletop with my finger: 「犭」. "The two vertical radicals on the right are a single character I know, 「師」(shi), or 'teacher'. There are," I drew the character out with my finger, counting strokes. "One, two, three, four, five, six, seven, eight, nine, ten strokes."

I took a breath while I picked the second dictionary back up, opening the back cover, to display the index of radicals. "Here are the three-stroke radicals, and here is kemono-hen. This is the page number where the list for the radical starts." I pointed to the number below the radical and opened the dictionary to that page. "Now I scan along through the tsukuri, the parts on the right, which are organized in order of stroke count." I ran my finger along the rows of characters, turned the page, counting the strokes in the right-hand part, until I came to, "Ten. It should be somewhere in here. Ah, here it is." I pointed at「獅」, and looked around. Four heads nodded doubtfully.

I turned back. "Ah." I read the pronunciation. "Shi-shi."

"Shei-shei?" Mom joked.

I chuckled. "Shi-shi." It means lion, or a mythical dog-like lion creature. Well, it's a little more complicated than that, because lion is actually two characters, but ..." I trailed off. 

The four of them waited for me to continue.

"Well, you get the idea, right?"

Julia sighed. "Sort of." She laughed, and my family joined with her. "Explain it to me again sometime, okay?"

"Sure. It can be kind of fun getting lost in the dictionary, and I have spent time memorizing the radicals, but it's a different kind of fun from actually reading the novel. Reading for meaning works better for remembering words than reading for words and grammar."

"Okay, enough," Giselle said. "Let's read the Christmas story."

(I did enjoy getting lost in my Japanese dictionaries, but, in the days before the old Macintosh Kanji Talk's Kotoeri software and the more recent computer-assisted character input tools in Linux and other OSses, looking characters up when you didn't recognize the character could definitely lead you on extensive wild-goose chases through the dictionary.)

After we read the traditional chapters of Matthew and Luke, I suggested we read the parallel events in 3rd Nephi chapter 1, in the Book of Mormon. 

That took another ten minutes, and we discussed what was happening in the new world when Jesus was born in the old for another five or so. When Julia left she said we'd given her a lot to think about. 

*****

For English coursework, the school counselors let me skip the freshman grammar review course because I had good grades from high school (and good ACT scores), and I substituted a literature class that was mostly reading and book reports. That left me needing one freshman or sophomore-level writing component credit, and that's why I took the research lab class, to practice research and bibliography techniques. 

Honestly, I needed the practice. I was very undisciplined.

"Konnichi wa." I set my pack on the table in the writing lab on the first day of the lab. "O-jama shite mo ii desu ka?"

"Eh? What?" The young woman working on homework at the table looked up in surprise.

"Aren't you Atsuko? Ms. Howell said you were Japanese."

"Well, I am, but I came here to practice English."

"Ah. That's good. I'm taking a research and writing lab for practice. If you have any questions, maybe I can help. I'm pretty good with grammar and stuff."

"Thanks." Her face didn't say much, but her eyes told me she had doubts. "But ... English only, okay?"

"You got it."

"'I got it?' What's that mean?"

"Hah." I had to think. Since answering in Japanese was already implicitly stated to be not helpful, I couldn't just say, "Ossharu tōri," or "Ryōkai." But the latter translated back to English seemed possible.

"Okay."

"Okay? What's okay?

"'You got it.' is close to 'Okay.' in meaning."

"Hmmm. You got it." She looked at me in puzzlement. "No. Not okay. It doesn't make sense to me."

"Oh. So you don't see it."

"No, I don't see it."

"You don't get it."

"No, I don't ... get ... it." She thought for a minute. "Okay, 'I get it.' means I understand."

"True." I raised my eyebrows, because I was surprised that she made that connection.

"So 'You get it.' means 'You understand.' Right?"

I nodded. "Right."

She nodded. "Except I would never say, 'Anata ga wakatta, ne.' Not, mmm, not for this. It's rude."

I bit my lip. She was right. "But, ... no Japanese?"

She shook her head.

"No fair."

If she'd been an American, she'd have rolled her eyes. Instead, she raised her eyebrows and sighed. "Komatta mono, ne. Oh, okay, just this once."

"Wakatta ja nai desu ka?"

"No. Definitely not. Not used here. And still not very polite."

"One more?"

She sighed again. "Okay, if you insist."

"Nozomareru tōri ni shite ageru."

"That's not Japanese."

I raised my eyebrows, but she shook her head. "I would not say it."

"Okay. Anyway, I was trying to tell you I would give you what you want. That's what okay would mean, right?"

"Hmm." After a few moments of thought, she nodded. "Okay, I get what I asked for. Maybe I get it. It just feels like 'Zama miro!'"

I sighed and rubbed my forehead. "You've got a point there. But it's not rude in English. Hmm." I gave it one more try. "Sō yū fū ni yatte ageru wa." 

Now she looked thoughtful again and nodded. "I guess I can understand it." 

She looked thoughtful again. "One more thing you ... to understand, okay?"

I nodded.

"I have a boyfriend. We're engaged."

I nodded. "Got that. He's lucky. I promise I won't ask you out nor anything." 

She looked relieved. "Thank you."

*****

One of the general ed classes I selected to fill out my math requirements was an easy introduction to statistics class that didn't get into the calculus. Not much to say about it, except that we had a bunch of students who were imaginative enough to figure out how to have fun with the statistics experiments and a teacher who thought students learning while having fun was great.

*****

Across several nights after school, during the first week of the term, after delivering newspapers and collecting the customers' subscription money, I wired the BASIC ROM socket pins into the circuit board. It was a 4 kilobyte ROM, assembled to start at address hexadecimal C000. I checked the wiring carefully, and then powered it up. The monitor prompt showed, so at least the ROM was not causing bus conflicts or such.

(Motorola chose the convention of indicating hexadecimal numbers with the dollar sign, so C000sixteen would be written $C000 in their documents and code, and that's the convention I'll use from here.)

(And, in the real world, I don't remember for sure which BASIC interpreter I had, nor do I remember where it was assembled to start. The computer is across the ocean as I write this, which makes it hard to check many of my facts. But this is a novel.)

I have found that there are many problems that look hard at first, but after I have some time to just let them sit in my head, when I come back to them I can work them out. Shorting the keyboard input was one of those. I just needed to short the ASCII code into the PIA port, 1s through a resistor to +5V power, and 0s direct to 0V ground, then hit the strobe input, once for each simulated keypress.

It would have been electrically cleaner to have each pin separately tied high through 100 kilo-ohm resistors, then just short the 0s low, but that was a fair amount of work, and had the additional risk of longer stretches of wire in the temporary circuits to cause unwanted shorts. And if I were going that far, why not latch the lines? And then provide a full front-panel interface with toggle switches? 

 


I decided not to go down that path until I tried the easy approach, with one common 100KΩ resistor to +5V to short the 1s high to, shorting the the 0s direct to ground. 


I wrote down the combinations of lows and highs for the monitor command to jump into the BASIC ROM at address $C000:

G: 1000000 (71 -- $47) bit 6 high, the rest low.
C: 1000011 (67 -- $43) bits 6, 1, and 0 high, the rest low.
0: 0110000 (51 -- $33) bits 6 and 5 high, the rest low.
0: 0110000 (same)
0: 0110000 (same)
enter: 0001100 (12 -- $0C) bits 3 and 2 high, the rest low.

I could set the seven code strap wires up on the socket, than momentarily hit the strobe with the eighth strap wire.

It took several tries, because the strobe wire tended to bounce electrically, effectively typing the same character several times in a row. When that happened, I'd have to hit the reset button and start over. But, after several tries, I succeeded in starting the BASIC interpreter:

TINY BASIC FOR MOTOROLA 6800
VERSION 4.2
COPYLEFT
OK
_

Tiny BASIC Boot Screen B/W

(In the real world, I didn't try this before we got the keyboards connected and working. But BASIC did come up immediately when we first entered the command, while testing the keyboard.)

I thought that was cool.

I called Denny, and he thought that was great, too. 

*****

For the class in singers' diction, I talked the voice coach into letting me sing in Japanese. I chose a Japanese pop song, Mayumi Itsuwa's "Koibito Yo" (transposed down to my range), and a church hymn, William W. Phelps's "O God, the Eternal Father" in Japanese translation for my recitals. 

(The hymn is sung to a tune adapted from Mendelssohn's Abschied.)

"Koibito yo, soba ni ite, kogoeru watashi no soba ni i--." 

Atsuko was laughing at me and I stopped singing as I sat down in the writing lab.

"O-kama."

"Hidoi!"  

We both laughed.

"You have a good voice, but it's funny to hear a guy sing it."

"I needed a Japanese pop song with some musical depth for my recital."

She shook her head in amusement. "Recital? Uhm, you will sing it in public?"

"For a class in singing."

"Will people listen to you?"

"If anyone comes, sure. You could come and bring your boyfriend."

She smiled. "I think I will."

(In the real world, the hymn was in a different semester from when Atsuko was there. And I didn't have sheet music for accompaniment for any of my Japanese pop songs, so I couldn't sing them for recitals. Had to have an accompanist. But I have often been told my a capello rendition of "Koibito Yo" is interesting, for some value of interesting.)

*****

For the first couple of weeks in the BASIC course, we used punched cards for programs and data. Punched cards only store a single line of code per card. With an 80 column card, a stack of a hundred cards is roughly equivalent to 8 Kilobytes of program code. One page of single-spaced typewriting is about the equivalent of 60 punched cards. An 8 GB SD card can hold the equivalent of about a hundred million punched cards.

I may still have some of those punched card BASIC decks stored somewhere.

During the second week of the class, Professor Bright used some slides of Pascal code to show us the basic elements of structured code. Then Professor Crane showed us how to use GOTOs to synthesize them. With a bit of discipline, you can write structured code in line-numbered BASIC, but the BASIC languages generally available back then didn't give you a lot of support.

While they were at it, they also showed us a little how local variables are used in Pascal. 

They didn't show us the underlying mechanisms for Pascal, but my study of assembly language gave me a bit of a glimpse of how it would work.

Toward the end of the second week, the school allocated room for us on a hard disk drive somewhere, and we each got 4K of storage. It wasn't much storage, but it was enough for our projects. Mostly. If we needed more, we could ask the teachers for more.

I got a little spoiled, running BASIC on the mainframe, even with such a small storage area. Univac BASIC had a lot of useful features. 

*****

 Fred Burns from the other ward stopped me to talk in the hall between meetings for wards.

"So, Joe, how's school? Classes coming together?"

"It's coming together okay, eh, ..."

"Fred Burns. Get the classes you wanted?"

"Pretty much, Brother Burns. I'd thought I'd try to finish the associates' degree in a year, but my brother talked me into slowing down so I'd have time for other things."

"Good for him," he said enthusiastically. "Call me Fred. Your father tells me you're building a microcomputer."

"Well, yeah. My brother got me a prototyping kit from Motorola, where he works."

"Motorola. That would have the 68000 in it, then?"

"The 68000 would be cool, but we're starting easy with the 6800."

"I see. What do you plan to do with it?"

"Use it in classes for now. It has BASIC in ROM, so I can use it for a programmable calculator, and I'll probably be doing lab work for some of my electronics classes with it. Are you interested in microcomputers, too?"

"Not as a hobby, I get enough of computers at work."

"Oh. You work in computers?"

"I'm a computer technician for the local IBM office. Have you heard about IBM's summer internships?"

"No, can't say that I have."

"You should apply, get some experience and money."

"How would I do that?"

He laughed. "You know, I should've asked about that at work before I mentioned it to you. I'll check."

We talked a bit more, and agreed to talk again soon.

TOC

[Current backup at https://joel-rees-economics.blogspot.com/2020/01/bk03-33209-school.html.
Earlier backup at https://joel-rees-economics.blogspot.com/2020/01/bk02-33209-school.html.
Earlier backup at https://joel-rees-economics.blogspot.com/2020/01/bk01-33209-school.html.
Original backup at https://joel-rees-economics.blogspot.com/2020/01/bk-33209-school.html.]

No comments:

Post a Comment

33209: Discovering the 6800 -- Parents and Polygamy

A Look at the 8080/TOC "Whoa, Merry, look who's here!" Jim said, sotto voce. He, Roderick, and I were at our lab table ...