Author Topic: Teaching myself assembly  (Read 2003 times)

0 Members and 1 Guest are viewing this topic.

Offline sigtau

  • 29
  • unfortunate technical art assclown
Teaching myself assembly
As a boredom-killer for when I'm out of town and unable to use my game dev machine, I have taken up the clumsy art and exact science that is assembly code.  Toying around with the x86 instruction set at the moment, and I just wrote my first real piece of code:

Code: [Select]
org 100h

; set screen to 80x23 chars, 16 colors
mov al,3     
int 10h

; enable all 16 colors
mov bx,0
int 10h

; set the segment register
mov ax,0b800h
mov ds,ax                 

; print the characters
; every other byte is used because
; the first byte assigned is the ascii character
mov [02h], 'H'
mov [04h], 'e'
mov [06h], 'l'
mov [08h], 'l'
mov [0ah], 'o'
mov [0ch], ','
mov [0eh], ' '
mov [10h], 'W'
mov [12h], 'o'
mov [14h], 'r'
mov [16h], 'l'
mov [18h], 'd'

; Functionally the same as "press any key to continue"
mov ah,0
int 16h


ret


Now, none of this is really all that difficult--it's the protected mode stuff that really is a mind-rape to me.  Where would you guys recommend I look to to leran more?
Who uses forum signatures anymore?

 

Offline Thaeris

  • Can take his lumps
  • 211
  • Away in Limbo
Re: Teaching myself assembly
...

The only assembly language I know is G-code for CNC machines. Good luck with whatever you intend to do with what you're working with!
"trolls are clearly social rejects and therefore should be isolated from society, or perhaps impaled."

-Nuke



"Look on the bright side, how many release dates have been given for Doomsday, and it still isn't out yet.

It's the Duke Nukem Forever of prophecies..."


"Jesus saves.

Everyone else takes normal damage.
"

-Flipside

"pirating software is a lesser evil than stealing but its still evil. but since i pride myself for being evil, almost anything is fair game."


"i never understood why women get the creeps so ****ing easily. i mean most serial killers act perfectly normal, until they kill you."


-Nuke

  

Offline JGZinv

  • 211
  • The Last Dual! Guardian
    • The FringeSpace Conversion Mod
Re: Teaching myself assembly
Don't know how much it will be a help, but here's some pages on cracking assembly and related tutorials.

http://web.archive.org/web/20100426095113/http://home.online.no/~reopsahl/files/assem.htm

http://win32assembly.online.fr/tutorials.html
True power comes not from strength, but from the soul and imagination.
Max to PCS2 to FS2 SCP Guide
The FringeSpace Conversion Mod

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Teaching myself assembly
youre better off learning asm on something with a smaller instruction set, like a microcontroller.

theres also this if you want to continue using x86
http://www.returninfinity.com/baremetal.html
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline LHN91

  • 27
Re: Teaching myself assembly
Any assembly I've learned was on a 68k. Significantly less mid-rapey than x86. May be a better base to start with.

EDIT: and there are plenty of free emulators to test the 68k code out on.

 
Re: Teaching myself assembly
Assembly is the devil's own because doing anything really useful (writing to the screen/etc) is extremely platform specific.
Best way to get into assembly is to use it. Seems to be easiest to do that under Linux (but watch out for AT&T style syntax instead of Intel style syntax).

Hope you've been finding assembly not too bad!
STRONGTEA. Why can't the x86 be sane?