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...

Sunday, March 1, 2020

Backup: 33209: Parameters

Backup of https://joelrees-novels.blogspot.com/2020/03/33209-parameters.html.


[JMR202003051345 -- extensive additions:]

Chapter 9: Interviewing IBM

Chapter 10: Parameters


(As I mentioned already, the real me was not brave enough or something, and never got disk drives for the Micro Chroma 68. Maybe he was a bit lazy in his thinking. But he thought saving up for tuition at a university where he could get a full bachelor's degree was more important than getting and developing his tools. And he had some other faults in his thought processes, but it is not my purpose to make this a confessional. Everybody makes mistakes.)

Friday after classes and newspapers, I loaded my stuff in the Colt again and headed to Austin. Got there late but got a look at Denny's computer. He was just finishing the box when I arrived.

He had used my coming as an excuse, and got the computer put together as far as mine, but his box was much nicer. He had a router, and other woodworking tools which I did not, and he had more experience working with wood than I did.

While we worked on the computers and discussed plans for Saturday, Denise listened, not saying much. When we talked about ways to tune the cassette interfaces without an oscilloscope, I saw her grimace.

*****

In the morning, Denise went with us to the surplus store. "Got to make sure my husband doesn't spend too much money," she commented with a wry, knowing smile as we left the house.

The two of them exchanged glances, and Denise wrinkled her nose at Denny.

He chuckled resignedly. "I know what our budget is, honey. I can keep things within the budget."

I kept out of it.

At the surplus store, the first thing we picked out was EPROM erasers. Then we checked our budgets and looked at floppy disk drives.

"Those eight inchers are a real steal," John said as we passed them by. Denny and I exchanged glances.

I shook my head. "Well, if I wanted compatibility with the school's 8080 trainer system floppies, I guess they would be. Or if I wanted compatibility with IBM's old minicomputers and mainframes. At least, I guess they aren't IBM's recent high density format."

"No, only capable of a quarter of a megabyte. But I'll give you two for the price of one."

That was tempting.

(These days, such drives go at really good prices among the retro community. Of course, inflation means that that it would not have been a good financial investment, even of the small sort. If you worry about the monetary value of such things.)

Denny shook his head. "Maybe later, but I don't think I have space for two drives that big."

"Ah, well," John grinned. "I guess I'll just have to show you the five and a quarter inchers I got in last week. A little more expensive, but they have opposing heads for double-sided disks, and the heads are double-density capable. If you don't want those, I have single-sided, double-density five and a quarter inchers for cheap, too."

"None of these have circuit boards, Denny, dear." Denise was frowning as she examined the drives on the shelves in front of us.

Denny sighed. "It's hard to get surplus drives with electronics that works, honey."

John raised his eyebrows and nodded. "Electronics that doesn't work, yeah, that's fairly easy to get, but, unless you have manufacturing docs, that's not a good idea."

He chuckled. Denny and I nodded. Denise pursed her lips in an ironic half-smile.

I picked up one of the single-sided, double density drives to look at. "Maybe, depending on a lot of things, a pair of these SS-DD drives for Giselle's Color Computer would be worthwhile. I understand the models Radio Shack is selling for it are SS-DD. But I'd have to replicate their electronics, and their controller, blind. And I don't think I'm ready for that, yet."

I put it back down and picked up one of the double-sided, double-density drives. "But I can only afford one of the DS-DD drives today, if we go that way."

"I'm going to need one of the DS-DD drives," Denny said.

John nodded. "How about one of each, and the SS-DD at half price?"

I calculated the prices. "I have enough money to do that, and it's often useful to have two drives, even if they aren't the same size."

John cocked his head. "If you want to share your electronics when you get it working, I could stock and sell some boards for you."

Denny and I looked at each other and nodded.

"Yeah. We'll think about that," Denny said with a grin.

"These floppy prices are pretty good."  I picked up a box of DS-DD diskettes and a box of SS-DD diskettes. Split half-and-half with you?"

"Let's do that."

"So where is this oscilloscope you want to buy, honey?" Denise asked. "I need to see the price on it or we can't budget it."

Denny and I looked at each other in surprise, and Denise rolled her eyes at us.

"You need it, Honey, so we need to plan for it. Joe, I think you'd better be planning for one, too."

So she got a look at the scopes and wrote down the prices before we left.

*****

Back at their house, we burned the assembler and debug package software into EPROMs, and Denny looked through the TSC catalog I had brought. Denise agreed that it would be right to purchase official copies of what we were using, and Denny took down the order information.

We also burned a copy of the games collection TSC sold.

"Good for testing and demonstrations," I reasoned.

"Yeah. And for looking at the object code and stealing ideas from it."

"Ideas, only."

"Yeah."

Then I helped with some of the honey-does Denny had waiting, helping him finish the sanding and put down the sealer coat on the hand-made bunk beds for their kids, and do laundry and take care of lunch while Denise rested. Their third was on its way, and she was a bit tired after the trip to the surplus store.

While we worked, we talked about what the interface and control circuitry for the floppy drives would need. Denise listened abstractedly to our conversation.

After the sanding was finished and the sealer coat applied, we sat down with the computers, and I checked the patches for the assembler and the debugging environment, then we burned both into ROMs and started figuring out how to use them.

Just for fun, we decided to burn the games into a ROM, and wrote a menu program to select a program from the ROMs, select and enable the ROM, and execute the program.

TICTAC FDB $B008 ; START ADDRESS
      FCB $40 ; ROM select/enable bit (set only one bit!)
      FCC "TIC-TAC"
      FCB 0 ; NUL TERM

 "That looks like a good layout for the table of programs."

"Reasonably long label names is sure nice."

"Six characters is a lot better than BASIC's one or two character names."

"Now how do we pass the address of the program name to the routine to show it on the screen?"

"Put it in a global variable called STRADR?"

"Global. We don't need to worry about interrupts, but I sure don't want to remember to check whether there's something else allocated at the address."

"Push it on the stack."

"Where're the PSHX and PULX instructions?"

"This isn't 6801. They don't exist."

"That's awkward."

"We can load the top half in an accumulator and push it, then repeat for the bottom half."

"That gets it on stack, but then we still need to get it into X in the called code. The only way is to use a global variable."

"How about a software stack pointer in a global variable?"

(The real Denny actually made a comment like this to the real me. The real me blew it off, thinking that the 6801 and the 6809 were just a design away, and then failed to do the design work to get there for either of the more powerful processors.)

"Hmm. And if all the software I write uses that software stock pointer, and saves and restores it on when switching tasks, we're actually golden."

(That was an important realization, okay? Maybe software from other people would make conflicting use of the memory location, but I could write my software to recognize and use it.)

"The CPU registers themselves are just fast globals everyone recognizes as global."

"True."

At some point in the evening, we hooked the SS-DD drives up to the power supplies and our computers' parallel ports, carefully using level adjusters, op amps, and other parts from Denny's parts boxes to avoid driving them with too much current, and Denny showed me how we could prove to ourselves that the drive motor, the stepper motor, and the head-load solenoids worked.

Of course, we made sure we had a floppy between the heads for padding before we tried getting them to load.

And of course we took notes of voltages and currents as we worked. The numbers we recorded would help me parameterize the drive's operation, and knowing the operating parameters would help me design the electronics.

Denise watched us work, and celebrated with us when the wormgear moved and when the heads loaded.

"So we can believe these floppy drives will actually work some day!"

"Den, honey, just have a little faith."

"I do."

"Yeah, I guess I know."

I turned my head to let them have a kiss in peace.

*****

At the student ward on Sunday, I re-acquainted myself with some of the members I'd met the previous month, and spent some time finding out a little more about the university. Got home in time for the home ward's young adult home evening.

*****

On Monday, I took the computer and the single-sided drive in to school, and Dr. Brown coached me while I used a scope to repeat what Denny and I had done Saturday evening. With curves and signals, instead of just simple numbers, I was able to work out programming for a test rig.

Then I began trying to parameterize the heads themselves, but was not able to get reads and writes.

Dr. Brown suggested some resources to check at the library. So I stopped in the library on the way home and did some research, borrowing issues of some technical magazines and making copies from books the library would not let me check out.

*****

"Wacha readin'?"

I was in the living room, taking advantage of the sofa. "IEEE magazine. An article about group code recording."

"Group what?"

"A way to make sure you can get the data you put on a floppy disk back off."

Dad gave me a blank look. "Now I know one more thing I don't know."

Mom laughed.

Dad grinned. "That pile of magazines more of the same?"

"Yeah."

Dad grew serious. "You're working hard on this."

"It's educational."

"How does this all come together?"

"Well," I thought for a bit, then pulled out a piece of scratch paper and used the coffee table as a desk, and drew a line:
____

"Is that a one or a zero?"

Dad looked at it sideways. "Trick question, I assume."

"Right. Hard to tell, isn't it?" I added a bit to the left side of the diagram:

¯¯¯¯\____________


"Still looks like a trick question. Or one of those doodles, where the answer is something about mama bowling balls."

Mom chuckled. Giselle slipped quietly into the room and peeked at the paper

I grinned. "You can see a transition from high to low, right?"

Dad sat down beside me. "If I'm looking at it from the same angle as you, yeah, I can see it that way."

"But without the transition, you can't tell whether it's low or high, right?"

"If it were graph paper, ...," Giselle began.

I nodded. "If it were labeled graphing paper, we wouldn't need the transition. Floppy disks are more like completely blank paper than labeled graphing paper."

"Can't they put rules and labels on them?"

"Engineers tend to do things as cheap as they can. Otherwise, it's hard to make a profit."

"Isn't that like, stupid?"

Dad grimaced, then grinned. "Sometimes, honey, getting things done is more important than doing them pretty or smart."

I nodded.

"Well!" Giselle huffed in exasperation, then came around and sat on the other side of me. "So, okay."

"What Dad said." I added a bit more:

¯¯¯¯\____________/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\________/¯¯¯¯

"Could you see that as a 1, a 0, a 1, a 0, and a 1?"

Doubtful nods were what I got in response.

"How about as 1-0-0-0-1-1-1-1-1-0-0-1?"

"The length between?" Giselle asked.

"Very good. The problem is that length is hard to measure on the floppy."

"It's hard to measure on the paper you're writing on, honey." Mom shook her head.

"So we limit the length, and instead of high being 1 and low being 0, a flip is a 1 and no flip is 0." I drew a new line:

¯\_/¯¯¯\___/¯¯¯\_/¯\_/¯\_/¯\_/¯\_/¯\___/¯¯¯\_/¯\

Giselle's face lit up in recognition. "It looks like a sound wave." She counted. "1-0-0-0-1-1-1-1-1-0-0-1. It's the same."

"Right. Transitions where there are 1s and no transitions where there are 0s. And there's a transition at the end of each bit, so it's easier to track the length. It's essentially two frequencies, so this is called frequency modulated data recording, or FM."

"Son, I believe you." Dad grinned.

Mom laughed.

"Well, this takes more space than people want it to, so IBM has a modified FM, or MFM, that is more compact. I thought I understood it when I was working with the fast cassette, but what I was doing was not what IBM calls MFM. And the microcomputer industry has several other ways called group coded recording, or GCR, that I'm trying to figure out now. And I'm trying to decide between them."

Mom smiled and nodded. "Which method does the floppies for Giselle's computer use?"

"According to what I've read, it seems to be one of the more common GCR formats."

Dad looked at Mom and she raised her eyebrows and nodded.

"You think you'd have a better time of it if you had a working drive to compare it to?"

I looked at Dad. "Yeah. I could definitely make more progress with more parameters known."

He frowned and tilted his head, and he and Mom went to Giselle's room, taking Giselle with them. I heard Giselle complain for a moment, then the three of them left. They returned some time later, when I was in my room doing some calculations on the Micro Chroma 68. Dad called me into Giselle's room, where I showed them how to hook the new floppy disk drive they had bought up to her computer.

They had also bought the disk version of the word processing program, and experiment with it.

"I think the ROM pack is easier to use," Giselle muttered under her breath.

"Definitely more commands to remember," I agreed.

Dad and Mom nodded in agreement.

"But you can get a lot more capabilities with software loaded from a floppy," I added.

Mom frowned. "I wonder if it's worth it."

"Well, let's just try to avoid forcing things. Use what's easiest for now, and I'll help with the disk commands when you need help."

Dad wrinkled his forehead. "Can we save files from the tape to the disk?"

"I think so." I tried some BASIC commands, and they worked, and Dad and Giselle grinned in relief.

"Can I take the whole rig to the lab sometime this week?"

"Can I come with, and watch?" Giselle's response surprised us all.

*****

Thursday, I took Giselle with me, and we took both computers to school. She set her computer up in Dad's office and worked while I went to class. Julia was there, and Giselle was showing her how to use it, when I finished classes. Dad wished us "Have a funny time!" as we left his office, and we took both computers to the electronics lab.

Julia dropped by after about an hour to watch.

With the clues I got from using the oscilloscope to watch what the Color Computer disk drive was doing, I was able to get my drives to read and write raw data under direct control of the CPU and the serial port that afternoon.

"Cool." Giselle was impressed.

Julia shook her head. "I don't understand anything of what you just did."

"Uhm," I started to get some scratch paper out.

"No, don't bother. I don't think it would help."

"Well, okay."

"I don't get it."

"What?"

"Why don't you just borrow the money and buy an Apple? Wouldn't that be faster?"

"Ah, faster, yes." Dr. Brown nodded.

"But I wouldn't be learning nearly as much."

"And that's the down side of it, besides having to pay the loan back." Dr. Brown took my side.

"I see." Julia pursed her lips.

Giselle refrained from saying anything, although she told me later that now she could definitely understand why I hadn't fallen head over heels for Julia.

Chapter 11:

[Backed up at https://joel-rees-economics.blogspot.com/2020/03/bk-33209-parameters.html.]

[JMR202003051345 -- extensive additions]

Chapter 9: Interviewing IBM

Chapter 10: Parameters


(As I mentioned already, the real me was not brave enough or something, and never got disk drives for the Micro Chroma 68. Maybe he was a bit lazy in his thinking. But he thought saving up for tuition at a university where he could get a full bachelor's degree was more important than getting and developing his tools. And he had some other faults in his thought processes, but it is not my purpose to make this a confessional. Everybody makes mistakes.)

Friday after classes and newspapers, I loaded my stuff in the Colt again and headed to Austin. Got there late but got a look at Denny's computer. He was just finishing the box when I arrived.

He had used my coming as an excuse, and got the computer put together as far as mine, but his box was much nicer. He had a router, and other woodworking tools which I did not, and he had more experience working with wood than I did.

While we worked on the computers and discussed plans for Saturday, Denise listened, not saying much. When we talked about ways to tune the cassette interfaces without an oscilloscope, I saw her grimace.

*****

In the morning, Denise went with us to the surplus store. "Got to make sure my husband doesn't spend too much money," she commented with a wry, knowing smile as we left the house.

The two of them exchanged glances, and Denise wrinkled her nose at Denny.

He chuckled resignedly. "I know what our budget is, honey. I can keep things within the budget."

I kept out of it.

At the surplus store, the first thing we picked out was EPROM erasers. Then we checked our budgets and looked at floppy disk drives.

"Those eight inchers are a real steal," John said as we passed them by. Denny and I exchanged glances.

I shook my head. "Well, if I wanted compatibility with the school's 8080 trainer system floppies, I guess they would be. Or if I wanted compatibility with IBM's old minicomputers and mainframes. At least, I guess they aren't IBM's recent high density format."

"No, only capable of a quarter of a megabyte. But I'll give you two for the price of one."

That was tempting.

Denny shook his head. "Maybe later, but I don't think I have space for two drives that big."

"Ah, well," John grinned. "I guess I'll just have to show you the five and a quarter inchers I got in last week. A little more expensive, but they have opposing heads for double-sided disks, and the heads are double-density capable. If you don't want those, I have single-sided, double-density five and a quarter inchers for cheap, too."

"None of these have circuit boards, Denny, dear." Denise was frowning as she examined the drives on the shelves in front of us.

Denny sighed. "It's hard to get surplus drives with electronics that works, honey."

John raised his eyebrows and nodded. "Electronics that doesn't work, yeah, that's fairly easy to get, but, unless you have manufacturing docs, that's not a good idea."

I picked up one of the single-sided, double density drives to look at. "Maybe, depending on a lot of things, a pair of these SS-DD drives for Giselle's Color Computer would be worthwhile. I understand SS-DD is what Radio Shack sells for it. But I'd have to replicate the electronics, and the controller, and I'm not quite ready for that, yet."

I put it back down and picked up one of the double-sided, double-density drives. "But I can only afford one of the DS-DD drives today, if we go that way."

"I'm going to need one of the DS-DD drives," Denny said.

John nodded. "How about one of each, and the SS-DD at half price?"

I calculated the prices. "I have enough money to do that, and it's often useful to have two drives, even if they aren't the same size."

John cocked his head. "If you want to share your electronics when you get it working, I could stock and sell some boards for you."

Denny and I looked at each other and nodded.

"Yeah. We'll think about that," Denny said with a grin.

"These floppy prices are pretty good."  I picked up a box of DS-DD diskettes and a box of SS-DD diskettes. Split half-and-half with you?"

"Let's do that."

"So where is this oscilloscope you want to buy, honey?" Denise asked. "I need to see the price on it or we can't budget it."

Denny and I looked at each other in surprise, and Denise rolled her eyes at us.

"You need it, Honey, so we need to plan for it. Joe, I think you'd better be planning for one, too."

So she got a look at the scopes and wrote down the prices before we left.

*****

Back at their house, we burned the assembler and debug package software into EPROMs, and Denny looked through the TSC catalog I had brought. Denise agreed that it would be right to purchase official copies of what we were using, and Denny took down the order information.

We also burned a copy of the games collection TSC sold.

"Good for testing and demonstrations," I reasoned.

"Yeah. And for looking at the object code and stealing ideas from it."

"Ideas, only."

"Yeah."

Then I helped with some of the honey-does Denny had waiting, helping him finish the sanding and put down the sealer coat on the hand-made bunk beds for their kids, and do laundry and take care of lunch while Denise rested. Their third was on its way, and she was a bit tired after the trip to the surplus store.

While we worked, we talked about what the interface and control circuitry for the floppy drives would need. Denise listened abstractedly to our conversation.

After the sanding was finished and the sealer coat applied, we sat down with the computers, and I checked the patches for the assembler and the debugging environment, then we burned both into ROMs and started figuring out how to use them.

Just for fun, we decided to burn the games into a ROM, and wrote a menu program to select a program from the ROMs, select and enable the ROM, and execute the program.

TICTAC FDB $B008 ; START ADDRESS
      FCB $40 ; ROM select/enable bit (set only one bit!)
      FCC "TIC-TAC"
      FCB 0 ; NUL TERM

 "That looks like a good layout for the table of programs."

"Reasonably long label names is sure nice."

"Six characters is a lot better than BASIC's one or two character names."

"Now how do we pass the address of the program name to the routine to show it on the screen?"

"Put it in a global variable called STRADR?"

"Global. We don't need to worry about interrupts, but I sure don't want to remember to check whether there's something else allocated at the address."

"Push it on the stack."

"Where're the PSHX and PULX instructions?"

"This isn't 6801. They don't exist."

"That's awkward."

"We can load the top half in an accumulator and push it, then repeat for the bottom half."

"That gets it on stack, but then we still need to get it into X in the called code. The only way is to use a global variable."

"How about a software stack pointer in a global variable?"

[JMR202003030020 -- original:]

The real Denny actually made a comment like this to the real me. I blew it off, thinking that the 6801 and the 6809 were just a design away, and then not doing the design.

"Hmm. And if all the software I write uses that software stock pointer, and saves and restores it on when switching tasks, we're actually golden."

"The registers themselves are just fast globals everyone recognizes as global."

"True."

At some point in the evening, we hooked the SS-DD drives up to the power supplies and our computers' parallel ports, carefully using level adjusters, op amps, and other parts from Denny's parts boxes to avoid driving them with too much current, and proved to ourselves that the drive motor, the stepper motor, and the head-load solenoids worked, making sure we had a floppy between the heads for padding before we loaded them.

Denise watched us work, and celebrated with us when the wormgear moved and when the heads loaded.

"So we can believe these floppy drives will actually work some day!"

"Den, honey, just have a little faith."

"I do."

"Yeah, I guess I know."

I turned my face to let them have a kiss in peace.

*****

At the student ward on Sunday, I re-acquainted myself with some of the members I'd met the previous month, and spent some time finding out a little more about the university. Got home in time for the home ward's young adult home evening.

[JMR202003030020 -- edits and additions:]


(The real Denny actually made a comment like this to the real me. The real me blew it off, thinking that the 6801 and the 6809 were just a design away, and then failing to do the design work to get there for either of those processors.)

"Hmm. And if all the software I write uses that software stock pointer, and saves and restores it on when switching tasks, we're actually golden."

"The CPU registers themselves are just fast globals everyone recognizes as global."

"True."

At some point in the evening, we hooked the SS-DD drives up to the power supplies and our computers' parallel ports, carefully using level adjusters, op amps, and other parts from Denny's parts boxes to avoid driving them with too much current, and Denny showed me how we could prove to ourselves that the drive motor, the stepper motor, and the head-load solenoids worked.

Of course, we made sure we had a floppy between the heads for padding before we tried getting them to load.

And of course we took notes of voltages and currents as we worked. The numbers we recorded would help me parameterize the drive's operation, and knowing the operating parameters would help me design the electronics.

Denise watched us work, and celebrated with us when the wormgear moved and when the heads loaded.

"So we can believe these floppy drives will actually work some day!"

"Den, honey, just have a little faith."

"I do."

"Yeah, I guess I know."

I turned my head to let them have a kiss in peace.

*****

At the student ward on Sunday, I re-acquainted myself with some of the members I'd met the previous month, and spent some time finding out a little more about the university. Got home in time for the home ward's young adult home evening.

*****

On Monday, I took the computer and the single-sided drive in to school, and Dr. Brown coached me while I used a scope to repeat what Denny and I had done Saturday evening. With curves, instead of just simple numbers, I was able to work out programming for a test rig.

Then I began trying to parameterize the heads themselves, but was not able to get reads and writes.

Dr. Brown suggested some resources to check at the library. So I stopped in the library on the way home and did some research, borrowing issues of some technical magazines and making copies from books the library would not let me check out.

*****

"Whacha readin'?"

"IEEE magazine. An article about group code recording."

"What's that?"

"A way to make sure you can get the data you put on a floppy disk back off."

Dad gave me a blank look. "Know I know one more thing I don't know."

Mom laughed.

Dad grinned. "That pile of magazines more of the same?"

"Yeah."

Dad grew serious. "You think you'd have a better time of it if you had a working drive to compare it to?"

I looked up at him. "Yeah. I could definitely make more progress with some more known parameters."

He nodded and left my room, taking Mom with him, and stopping in Giselle's room. I heard Giselle complain for a moment, then the three of them left. They returned some time later, and Dad called me into Giselle's room, where I showed them how to hook the new floppy disk drive up to her computer.

"I think the ROM pack is easier to use," Giselle muttered under her breath.

"Definitely more commands to remember," I agreed.

Dad and Mom nodded.

"But you get a lot more capabilities with loading software from a floppy."

Mom frowned. "I wonder if it's worth it."

"Well, let's just try to avoid forcing things. Can I take the whole rig to the lab sometime this week?"

"Can I come with and watch?" Giselle's response surprised us all.

*****

With clues from the Color Computer disk drive, and with Giselle and Dad cheering me on, I was able to get my drives to read and write raw data under direct control of the CPU by Thursday afternoon.

[JMR202003030020 -- end.]


Chapter 11:

[Backed up at https://joel-rees-economics.blogspot.com/2020/03/bk-33209-parameters.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.