comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Creating several types from a base type and conversion
Date: Sun, 19 Jan 2020 02:30:13 +0200
Date: 2020-01-19T02:30:13+02:00	[thread overview]
Message-ID: <h8hm8lFkghjU1@mid.individual.net> (raw)
In-Reply-To: <b3daf5da-63b0-4ac7-92cf-377754d1b79f@googlegroups.com>

On 2020-01-19 0:59, Ken Roberts wrote:
> On Saturday, January 18, 2020 at 9:57:08 AM UTC-8, Niklas Holsti wrote:
>> On 2020-01-18 9:32, Ken Roberts wrote:
>>> New to ada with a question about types.
>>
>> Welcome to the language!
>>
>> What did you program in before? Sometimes it is easier to give advice if
>> one knows the background of the person asking for it.
> 
> I touched on C way back when (sometime in the 80's) but my day job
> was not programming and didn't really dig into it.
> 
> For the last few years I've been programming Python (again, hobby,
> not day job) working on a PJLink control for network-connected
> projectors in an open source church project.

Ok, thanks, this is helpful.

>> - Can the computer to be emulated address only full 30-bit words, or can
>> it address also, say, characters (bytes) within a word?
> 
> The computer is 30-bit and the memory is 30-bit magnetic core. The
> memory control can return either a 30-bit word or 15-bit half-word
> from upper or lower half of memory address depending on one of the
> instruction modifiers.

Is it the AN/USQ-20? https://en.wikipedia.org/wiki/AN/USQ-20

>> - Is the computer you intend to emulate big-endian or little-endian?
>> There are two aspects to this question: first, conventions for numbering
>> bits (is bit 0 most significant or least significant?) and second,
>> addressing sub-word-units like characters (if possible) within a word
>> (does the lowest sub-word address access the most significant end of the
>> addressed word, or the least-significant end?).
> 
> The memory/computer model is 30-bit words both in computer and
> memory. No endianness.
> 
> 32K of directly addressable internal memory. Depending on a modifier 
> field in the instruction word, either a 30-bit word or 15-bit half 
> word (from either upper 15 bits or lower 15 bits) was returned from 
> memory for operatnds.

Ok, so there are no "half-word addresses" in the HW, so no half-word 
endianness.

Your other posts suggest that the manuals used little-endian bit 
numbering, so I assume you will use the same bit-numbering order in the 
record-representation clauses. You should then specify the Bit_Order 
aspect as System.Low_Order_First for those record types.

 From your other posts, it seems the practice was to store five 6-bit 
characters in a 30-bit word. There must be some "endianness" convention 
here: is the first of these five characters stored in the high bits of 
the word, or in the low bits? If the HW does not support character 
addressing, this endianness convention was defined and implemented by 
the SW running on the computer, and so does not have to be considered in 
the emulator per se.

>>> For most stuff, memory will be returning either DataWord or
>>> InstructionWord for each memory access, but I'm also looking at an
>>> easier way to manage characters for text display on the emulated
>>> monitors.
>> I would assume that in the original system, the diplay of characters on
>> the monitors was implemented in the SW programs that ran on the emulated
>> processor. Why should the processor emulator do something special for
>> this? Did the monitors display data directly from "display buffers" in
>> the 32K memory, using DMA?

> The "display" part was either an old-school teletype machine (using
> 5-bit characters)

I assume that the SW in the machine was responsible for sending the 
characters to the teletype, one by one, so the method for storing 
characters in words was a SW convention, right?

> or a CRT that was a combination radar repeater/computer symbology
> display unit with attached 15 line X 65 character text display using
> a really interesting 30-bit layout.
That sounds like possibly involving a HW-defined lay-out of characters 
in words. If you emulate this CRT, you may have to implement that in the 
emulator.

> (reaaalllly long URL from google reposted via bit.ly)
> 
> http://bit.ly/368sGgl  Picture of computer I'm trying to emulate.

Looks very much like the AN/USQ-20. And the acronym "NTDS" matches 
"Naval Tactical Data System", check.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .

  reply	other threads:[~2020-01-19  0:30 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-18  7:32 Creating several types from a base type and conversion Ken Roberts
2020-01-18 12:16 ` Simon Wright
2020-01-18 12:49   ` Ken Roberts
2020-01-18 14:56     ` Bill Findlay
2020-01-18 16:13       ` Jeffrey R. Carter
2020-01-18 18:20         ` Bill Findlay
2020-01-18 18:32           ` Jeffrey R. Carter
2020-01-18 20:34             ` Simon Wright
2020-01-20 16:38               ` Bill Findlay
2020-01-18 22:20       ` Ken Roberts
2020-01-18 15:09     ` Simon Wright
2020-01-18 22:16       ` Ken Roberts
2020-01-18 22:35         ` Simon Wright
2020-01-18 23:03           ` Ken Roberts
2020-01-18 23:38             ` Simon Wright
2020-01-19  0:12               ` Ken Roberts
2020-01-19  9:37                 ` Simon Wright
2020-01-19 11:48                   ` AdaMagica
2020-01-19 14:51                     ` Simon Wright
2020-01-19 15:24                       ` Niklas Holsti
2020-01-19 16:11                     ` Optikos
2020-01-19  0:33               ` Ken Roberts
2020-01-19  0:07         ` Niklas Holsti
2020-01-18 15:47     ` Simon Wright
2020-01-21 21:35     ` Shark8
2020-01-21 23:06       ` Niklas Holsti
2020-01-22  1:08         ` Ken Roberts
2020-01-22 14:18           ` Ken Roberts
2020-01-22  8:37       ` Simon Wright
2020-01-22 14:32         ` Shark8
2020-01-22 15:40           ` Simon Wright
2020-01-18 14:17   ` Optikos
2020-01-18 17:57 ` Niklas Holsti
2020-01-18 22:59   ` Ken Roberts
2020-01-19  0:30     ` Niklas Holsti [this message]
2020-01-19  1:07       ` Ken Roberts
2020-01-19  3:37 ` Ken Roberts
2020-01-23 21:39 ` Optikos
2020-01-24  9:35   ` Ken Roberts
2020-01-24 10:04     ` AdaMagica
2020-01-24 12:38     ` Optikos
2020-01-24 15:01       ` Ken Roberts
2020-01-24 15:22         ` Simon Wright
2020-01-24 15:40           ` Ken Roberts
2020-01-24 15:54   ` Simon Wright
2020-01-25 10:37 ` Ken Roberts
2020-01-25 10:44   ` Ken Roberts
2020-01-25 20:26   ` Shark8
2020-01-27 14:10 ` Ken Roberts
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox