• Please review our updated Terms and Rules here

Best way to learn 286 Assembly?

shawnerz

Experienced Member
Joined
Mar 14, 2009
Messages
60
Location
North of Dallas, TX
Hello,
I am wondering if anyone has any suggestions on the best way to learn '286 assembly. I have a Grid 1520 (286 laptop). I'm the moderator over on the RuGrid laptop group over on Yahoo.
mbbrutman has been a great help. But, the BIOS really needs to be decoded in order to get around some hardware issues (hard drive selection, RTC password bypass, etc).
I guess they really don't teach assembly at the community college. So, if anyone has some ideas for learning assembly, I would appreciate it.
Thanks,
-Shawn
 
i learned assembly by cracking DOS games. heh.
I picked up one of those buckaroo bonzai art of cracking tutorials on some BBS way back when, got soft-ice debugger (used on a 386 or higher though) and picked up a few 80s DOS games that I knew were still protected with doc checks. My first crack was "harley davidson: road to sturgis" and then I remember doing test drive III. Both were really pretty easy.

From there I branched into learning about the interrupt service routines (ralf brown's interrupt table) and then writing some DOS based hardware query type programs. (display total amount of memory, # and address of COM ports, etc)

I think peter norton's "programmer's problem solver" book helped a lot, as it gave examples and source code in (IIRC) basic, pascal, C, and assembly, and since I already knew basic programming, you could do a rosetta stone on the code to figure out what was going on.
 
I actually think a lot of colleges still do teach assembly (I'd hope so although it'd be a shame to see that replaced by java or something).

You can download some free books on assembly or BIOS interrupts that might help. I used to go to our local bookstore clearance section seeking books on assembly or hardware interrupts. From there it's not too terribly bad. It's just setting up your interrupt's needed settings then calling the interrupt which of course is pre-written code/macros and then seeing the result.

I'm not sure what the Grid has that could be proprietary but that's where you'd want to find a Grid hardware interrupt list.

The better books I've seen have the interrupts categorized or all listed and a help page on how to set them up. It's pretty nice although I don't and have't done much advanced stuff in asm.

Peter Norton's books weren't bad, The indispensable hardware book http://www.amazon.com/Indispensable-PC-Hardware-Book-3rd/dp/0201403994 was a fun read and has good descriptions of both dos interrupts and BIOS interrupts.

There's lots of books out there, but for me personally I just like a list of things vs a novel to read. I'll have to take a look around the house and find one of the books I liked. I know it was a black softback book that was just like a dictionary of assembly.
 
By "286 assembly" do you mean "286 protected mode" or "286 real mode"?

There's quite a bit of difference between 286 "real" mode and the protected mode, particularly if you want to fool with the system management instructions and tables. Since almost no modern software uses this mode, you might consider looking at some old magazines, such as Dr. Dobbs and PC Tech Specialist (aka. Winodows/DOS Developers' Journal, aka. Windows developers' Journal). There's also a fairly decent overview here.

On the other hand, just about any x86 tutorial will suffice for real mode programming instruction.
 
Jeff Duntemann's book "Assembly Language, Step by Step" is by far the best of the dozen or so x86 assembly language books I own. ISBN 0471578142. You can find it used at abebooks or powells, most likely, for next to nothing.

He's also got a new edition for Linux:
http://www.duntemann.com/assembly.htm

The old edition covers processors through the 286. Presumably the new edition goes beyond that.

-Mark
 
Thanks to everyone for their responses. It gves me some starting points.
@Chuck G: I don't know enough to answer your question. I imagine the BIOS runs in real mode. But, I don't know. Sorry.
-Shawn
 
Chuck was (and quite correctly) pointing out whether you were going to tinker with vintage code or write something in modern assembly language. The catch is modern assembly all uses protected mode which you have to enable, then map the memory to the protected mode memory layout/table, and that enables some additional commands as well as allows you to utilize more than 1MB of memory.

It's a bit more advanced but would be current. The old real mode assembly is kinda stuck at <1MB and uses memory locations in xxxx:xxxx format. It's vintage and works fine if you're not trying to do large or modern code.

I agree I enjoyed reading that step by step book when I first tried to learn assembly. It was the first book that didn't assume I knew everything and layed it out for me in understandable examples. After I read that part is when I found a reference book more useful but that was a great precursor.

Ah, here one is. "helppc" was a great tool while I was tinkering around. I used the downloaded/offline version but the ref can be found here http://stanislavs.org/helppc/ I found the interrupt reference to be great and it shows you an the values needed. Pretty nice addition to any reference.
 
barythrin said:
Chuck was (and quite correctly) pointing out whether you were going to tinker with vintage code or write something in modern assembly language. The catch is modern assembly all uses protected mode which you have to enable, then map the memory to the protected mode memory layout/table, and that enables some additional commands as well as allows you to utilize more than 1MB of memory.

What? 'Modern' assembly doesn't require protected mode. I don't even know what 'modern' is supposed to mean in this context.

I think what Shawn is looking to do is reverse engineer parts of the BIOS on the Grid. For that, it's real mode code. Learning plain old x86 assembler will do the job.
 
Thanks to everyone for their responses. It gves me some starting points.
@Chuck G: I don't know enough to answer your question. I imagine the BIOS runs in real mode. [But, I don't know. Sorry.

Yes, it's in real mode. What are you using for a disassembler for the BIOS code? IDA Pro 4.9 Free is a very nice disassembler that runs on Windows 2K or later.

Later 286 BIOSes (PS/2 in particular) do have protected-mode services (sometimes called "ABIOS"). About the only place you're going to run into 286 protected mode in your Grid BIOS is in the INT 15H services 87h, 88h and 89h that deal with extended memory services and the part of the POST that checks extended memory.

You'd use protected mode mechanisms if you were working in Windows "Standard" mode (I hate that term!) or OS/2 16-bit protected mode or even old versions of Xenix. While real-mode programming will form a good basis for learning protected mode, there are differences in the way memory and system resource management works.
 
Last edited:
Back
Top