From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Creating several types from a base type and conversion Date: Sun, 19 Jan 2020 02:30:13 +0200 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net bKefkIHbxIM5y+WA2KAUngh+sMHzHsNWMz8MoNxktNW3YApfFC Cancel-Lock: sha1:Cmsyzz6d6PdiBD5T+cNCaYTerU4= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:57890 Date: 2020-01-19T02:30:13+02:00 List-Id: 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 . @ .