• (16 bit) x86 Assembler lessons?

    From Bob Worm@21:1/205 to All on Wed May 28 16:21:58 2025
    Ey up, all.

    I've been rooting through some old 16 bit x86 code and I now realise I've been doing ARM for so long that x86 has become like a foreign language to me. I'm OK with the normal MOVs and arithmetic stuff but once I get into more obscure opcodes, particularly ones that assume their operands are in a certain registers, I soon end up with 50 tabs open. There seems to be little consistency in where the operands need to be instruction by instruction, maybe there's a rule I'm just not seeing? Or maybe my brain can only handle reduced instruction sets these days :)

    Can anyone recommend a decent resource to get me back up to speed (it's only been 30 years)? I have a couple of train / plane journeys coming up so something downloadable would be ideal.

    Thanks in advance,

    BobW
    --- SBBSecho 3.25-Linux
    * Origin: >>> Magnum BBS <<< - magnumbbs.net (21:1/205)
  • From tenser@21:1/101 to Bob Worm on Thu May 29 04:32:11 2025
    On 28 May 2025 at 04:21p, Bob Worm pondered and said...

    Can anyone recommend a decent resource to get me back up to speed (it's only been 30 years)? I have a couple of train / plane journeys coming up so something downloadable would be ideal.

    For 16-bit code, specifically? Bitsavers probably has a copy of
    the original 8086 programmer's reference manual, which will cover
    most of the instruction set. See
    https://bitsavers.org/components/intel/8086/

    If you're looking for something a bit more modern, then chapter
    2 of volume 2A of the Intel SDM is pretty good. https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm. html

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From Bob Worm@21:1/205 to tenser on Wed May 28 20:52:34 2025
    Re: Re: (16 bit) x86 Assembler lessons?
    By: tenser to Bob Worm on Thu May 29 2025 04:32:11

    Hi, tenser.

    For 16-bit code, specifically?

    Yup, the code I'm looking at is all 16 bit DOS.

    Bitsavers probably has a copy of
    the original 8086 programmer's reference manual, which will cover
    most of the instruction set. See https://bitsavers.org/components/intel/8086/

    Yes, a quick flick through that archive very quickly turned up an overview of what each register is for and some other really useful stuff. That's exactly the kind of thing I was hoping for.

    Thanks very much!

    BobW
    --- SBBSecho 3.25-Linux
    * Origin: >>> Magnum BBS <<< - magnumbbs.net (21:1/205)
  • From tenser@21:1/101 to Bob Worm on Fri May 30 03:52:33 2025
    On 28 May 2025 at 08:52p, Bob Worm pondered and said...

    For 16-bit code, specifically?

    Yup, the code I'm looking at is all 16 bit DOS.

    Bitsavers probably has a copy of
    the original 8086 programmer's reference manual, which will cover
    most of the instruction set. See https://bitsavers.org/components/intel/8086/

    Yes, a quick flick through that archive very quickly turned up an
    overview of what each register is for and some other really useful
    stuff. That's exactly the kind of thing I was hoping for.

    Great! Happy to hear it.

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From hollowone@21:2/150 to Bob Worm on Sun Jun 1 12:09:15 2025
    Can anyone recommend a decent resource to get me back up to speed (it's only been 30 years)? I have a couple of train / plane journeys coming up so something downloadable would be ideal.


    I assume you're doing all that in the context of MSDOS and its tools.
    I'd dig for some old books. I had fun reading Turbo Assembler 4/5 books published in the 80s/early 90s.

    I got reminded how important it was to learn IDEAL when in TASM reality.

    -h1

    ... Xerox Alto was the thing. Anything after we use is just a mere copy.

    --- Mystic BBS v1.12 A49 2024/05/29 (Linux/64)
    * Origin: 2o fOr beeRS bbS>>20ForBeers.com:1337 (21:2/150)
  • From Bob Worm@21:1/205 to hollowone on Sun Jun 1 21:40:14 2025
    Re: Re: (16 bit) x86 Assembler lessons?
    By: hollowone to Bob Worm on Sun Jun 01 2025 12:09:15

    Hi, hollowone.

    I assume you're doing all that in the context of MSDOS and its tools.
    I'd dig for some old books. I had fun reading Turbo Assembler 4/5 books published in the 80s/early 90s.

    Yup, that's right. I feel like an old guide would be best - they really knew how to write those things in the 80s. It seems like a lost art today.

    I could do with an INT 21h cheat sheet, man that interrupt does a lot of things!

    Thanks for checking!

    BobW
    --- SBBSecho 3.25-Linux
    * Origin: >>> Magnum BBS <<< - magnumbbs.net (21:1/205)
  • From hyjinx@21:1/126 to Bob Worm on Mon Jun 2 21:14:07 2025
    Yup, that's right. I feel like an old guide would be best - they really kn how to write those things in the 80s. It seems like a lost art today.

    I could do with an INT 21h cheat sheet, man that interrupt does a lot of t

    INT21 sure did a lot of things! I second that, if anyone has an int21 cheat sheet, let us know!


    hyjinx // Alistair Ross
    Author of 'Back to the BBS' Documentary: https://bit.ly/3tRINeL (YouTube) alsgeeklab.com

    --- Mystic BBS v1.12 A49 2024/05/29 (Linux/64)
    * Origin: Al's Geek Lab -=- bbs.alsgeeklab.com:2323 (21:1/126)
  • From mary4@21:2/150 to hyjinx on Mon Jun 2 09:22:50 2025
    Yo i am not fluent in 8086 asm i want to be. i know a little bit of it but not enough to write a program xD

    I worked on ted5 to make it work on 16 bit 286 and 8088!

    --- Mystic BBS v1.12 A49 2024/05/29 (Linux/64)
    * Origin: 2o fOr beeRS bbS>>20ForBeers.com:1337 (21:2/150)
  • From hollowone@21:2/150 to Bob Worm on Mon Jun 2 11:47:48 2025

    I could do with an INT 21h cheat sheet, man that interrupt does a lot of things!

    Thanks for checking!

    Well if you care about driving this discussion forward I can tell you that I also have come back to a bit of 86 assembly these days.

    I parked one project related to MS-DOS demoscene revival to check how far i can go just booting up my own PC OS.

    Bootstrap (first 512bytes to boot up from a floppy) already works.
    Sending text and showing numbers too. I use it to welcome the user and
    show how much memory is available on the system, which CPU is supported and mark it in certain memory block before I read first sectors from a floppy to boot up for more.

    Now trying to understand conventional memory better assumed there is no OS and I have no filesystem too.. it'd be fun to invent something more creative than FAT12 as next step.

    that's my current experiment as VESA 2.0 stuff. Int 10h and Int21h and predefined PMODE extender connected to WATCOM is way to boring and "I've done that already" kind of thing :)

    -h1

    ... Xerox Alto was the thing. Anything after we use is just a mere copy.

    --- Mystic BBS v1.12 A49 2024/05/29 (Linux/64)
    * Origin: 2o fOr beeRS bbS>>20ForBeers.com:1337 (21:2/150)
  • From hollowone@21:2/150 to hyjinx on Mon Jun 2 11:48:59 2025
    INT21 sure did a lot of things! I second that, if anyone has an int21 cheat sheet, let us know!

    Brown's list?

    https://www.ctyme.com/intr/int-21.htm

    -h1

    ... Xerox Alto was the thing. Anything after we use is just a mere copy.

    --- Mystic BBS v1.12 A49 2024/05/29 (Linux/64)
    * Origin: 2o fOr beeRS bbS>>20ForBeers.com:1337 (21:2/150)
  • From Bob Worm@21:1/205 to hollowone on Wed Jun 4 00:01:39 2025
    Re: Re: (16 bit) x86 Assembler lessons?
    By: hollowone to hyjinx on Mon Jun 02 2025 11:48:59

    Hi, hollowone.

    Brown's list?

    https://www.ctyme.com/intr/int-21.htm

    That looks like a good reference, thanks.

    I was really looking for something that fits on one page - I have no idea if that is possible :\

    BobW
    --- SBBSecho 3.25-Linux
    * Origin: >>> Magnum BBS <<< - magnumbbs.net (21:1/205)