Live data from Hacker News

Assembly Language for Beginners [pdf]

yurichev.com

81–90 of 101 posts

Re: Assembly Language for Beginners [pdf]

#81

I actually got paid a salary for learning & programming in IBM mainframe assembler (BAL or Basic Assembly Language) in 1970, for an insurance company. The CPU memory was so small (32K, yes 32,768 bytes) that the only way we could squeeze enough functionality was to write in assembler, with overlays (no virtual memory). Debugging consisted of manually toggling hex data and instructions at the control panel. What a bla…

Ooo! I have a question! Where do I learn more about overlays? The BSD 2.11 code I've read has comments about overlays, but I have no idea where to learn more about how to understand the topic. I came across it while I was seeing if I could get newlib to compile for the PDP-11.

You could look at some old Turbo Pascal articles (though don't know how applicable it is to other systems): http://www.boyet.com/articles/publishedarticles/theslithytov...

Re: Assembly Language for Beginners [pdf]

#82

I actually got paid a salary for learning & programming in IBM mainframe assembler (BAL or Basic Assembly Language) in 1970, for an insurance company. The CPU memory was so small (32K, yes 32,768 bytes) that the only way we could squeeze enough functionality was to write in assembler, with overlays (no virtual memory). Debugging consisted of manually toggling hex data and instructions at the control panel. What a bla…

Ooo! I have a question! Where do I learn more about overlays? The BSD 2.11 code I've read has comments about overlays, but I have no idea where to learn more about how to understand the topic. I came across it while I was seeing if I could get newlib to compile for the PDP-11.

https://www.google.com/amp/s/www.vox.com/platform/amp/policy...

Re: Assembly Language for Beginners [pdf]

#83

I actually got paid a salary for learning & programming in IBM mainframe assembler (BAL or Basic Assembly Language) in 1970, for an insurance company. The CPU memory was so small (32K, yes 32,768 bytes) that the only way we could squeeze enough functionality was to write in assembler, with overlays (no virtual memory). Debugging consisted of manually toggling hex data and instructions at the control panel. What a bla…

32KB was a ton of memory in the 70s.

Especially in 1970. That was a lot even for 1980.

Re: Assembly Language for Beginners [pdf]

#84

Earlier quoted context omitted.

Forgive me, but I'm struggling to understand how much useful work one could extract from a computer with only 32k of RAM. A microcontroller for an appliance, sure, but a mainframe? Could you tell us more about the work you were doing?

(An aside: do terms like "mainframe" and "microcomputer" have any meaning any more, when a Raspberry Pi Zero has orders of magnitude greater RAM and power than a '70s piece of "big iron"?)

One of the four large banks in my country I worked at only a few years ago still managed all their internal change management process on a fairly old IBM mainframe.

You had to connect via an arcane telnet client (tn3270 protocol perhaps?) and input the change details. No fancy web forms. Perhaps it was a limitation of the application, but you couldn't mix uppercase and lowercase in the one form.

Re: Assembly Language for Beginners [pdf]

#85
post #79

Earlier quoted context omitted.

I would not have guessed that there were automatic ECG analysis in 1970! Was it good? Are today's methods any better?

We were the first commercial offering. There was one or two working at universities. It was quite good. I would imagine that they are--I haven't kept track.

Awesome... Can you please share more stories of that time with us? Maybe write them somewhere ?

Re: Assembly Language for Beginners [pdf]

#86
At one point when I was considerably younger I started learning 32-bit x86 assembly as my very naive career goal was to become the next Linux Torvalds. I managed to construct a multiboot-compliant 32-bit kernel that could load tasks from a ext2 ramdisk image passed to the bootloader and multitask up to around 64 processes. I figured out how to use the CR3 register and craft page tables, enter into kernel syscalls using software interrupts, handle CPU faults, page faults, double faults etc. It was quite the learning experience until it eventually crumbled under my lack of skill and foresight. In short, I got more or less about as far as most amateur, self-taught, lone OS developers get before losing interest and giving up.

Fast forward a couple of decades, and I found myself reverse engineering CP/M for the Z80 processor in order to create a virtual Z80-based system that ran inside Unreal Engine. I started with Udo Munk's wonderful Z80pack system, adapted a public domain Z80 CPU emulator which was written in C to C++, and did minimal reimplementation of the Z80pack terminal and disk I/O devices. Since the systems were implemented as "actors" in UE4 it's possible to spawn and run quite a few concurrently as long as you limit the CPU speed of each instance somewhat.

The resulting virtual system in UE4 is able to run original CP/M ports of Rogue and Zork (https://i.imgur.com/gnOCp3e.png), various Z80 instruction exercisers (https://i.imgur.com/kwNuq5X.png), a Z80 C compiler and and even Wordstar 4 (https://i.imgur.com/Q6307w3.jpg) and Microsoft BASIC.

Learning assembly can be a lot of fun - it can really teach you quite a bit about systems architecture that you otherwise might not get if you're always programming in high-level languages only.

Re: Assembly Language for Beginners [pdf]

#87
post #85
post #79

Earlier quoted context omitted.

We were the first commercial offering. There was one or two working at universities. It was quite good. I would imagine that they are--I haven't kept track.

Awesome... Can you please share more stories of that time with us? Maybe write them somewhere ?

I should write up a blog post. When I do, I'll submit it here.

Re: Assembly Language for Beginners [pdf]

#88
post #82

Earlier quoted context omitted.

Ooo! I have a question! Where do I learn more about overlays? The BSD 2.11 code I've read has comments about overlays, but I have no idea where to learn more about how to understand the topic. I came across it while I was seeing if I could get newlib to compile for the PDP-11.

https://www.google.com/amp/s/www.vox.com/platform/amp/policy...

Dammit. Wrong link.

Here is the correct one:

https://www.elsevier.com/books/linkers-and-loaders/levine/97...

Re: Assembly Language for Beginners [pdf]

#89
post #27

Maybe too much content? 1000+ pages, many architectures... Probably too much content for a beginner book? Btw, a great book imho is "Assembly Language Step By Step - Programming with Linux - 3rd ed" ( https://musho.tk/l/d2d56a34 ). The great things is that it is an easy read and really starts from the basic and explains how the i386 architecture works, and then explains how to program it using assembly. The sad thing…

I read the 2nd edition of Jeff Duntemann's book (DOS & Linux) in little more than a couple of sittings. Incredibly readable! Best introduction on the background of how CPUs work and what machine language is about.

Re: Assembly Language for Beginners [pdf]

#90

I actually got paid a salary for learning & programming in IBM mainframe assembler (BAL or Basic Assembly Language) in 1970, for an insurance company. The CPU memory was so small (32K, yes 32,768 bytes) that the only way we could squeeze enough functionality was to write in assembler, with overlays (no virtual memory). Debugging consisted of manually toggling hex data and instructions at the control panel. What a bla…

Forgive me, but I'm struggling to understand how much useful work one could extract from a computer with only 32k of RAM. A microcontroller for an appliance, sure, but a mainframe? Could you tell us more about the work you were doing?

In 1969, a computer with "2048 words of RAM" and "36,864 words of ROM" managed a landing on the Moon and subsequent return[1].

People do amazing things with primitive tools.

[1] https://en.wikipedia.org/wiki/Apollo_Guidance_Computer

Post reply on HN