Ok hopefully i can be clear with this but here goes nothing!

ok so i understand assembly is pretty much the same as op codes...just assembly is a mneonic(however u spell it) way of writing the language.  Well are the op codes "machine language" or not? so of my books state this is machine language.  i thought 01010101 was machine language :/. 


another question is when i open a binary with notepad this is viewing the opcodes/assembly language accept it looks distorted because notepad is trying to show it in ascii instead of hex?
Posted on 2010-09-15 22:50:50 by dougfunny

Well are the op codes "machine language" or not? so of my books state this is machine language.  i thought 01010101 was machine language :/. 


Machine language is the numeric representation of the assembled instructions (opcodes and operands, as they appear in memory at runtime). It's not relevant which number system (base) they are shown in, but I would say most ASM programmers are expecting to see hex.

For example, most of the experienced members of this forum would know instantly what 90 90 90 means.
I have not stated whether this is hex or decimal, those of us with enough experience would automatically think this is hex, and that it is saying "NOP NOP NOP" :)


another question is when i open a binary with notepad this is viewing the opcodes/assembly language accept it looks distorted because notepad is trying to show it in ascii instead of hex?


Basically correct - Notepad is trying to display 8-bit binary data using an ascii set of characters.



Posted on 2010-09-16 00:50:26 by Homer
Here ya go - you can view this one in Notepad.


; assemble with "nasm -f bin -o hitext.com hitext.asm"
; view with "type hitext.com"

dec ax
inc bp
dec sp
dec sp
dec di
sub al,20h
push di
dec di
push dx
dec sp
inc sp
or cl,

int 20h


Best,
Frank

Posted on 2010-09-20 05:38:05 by fbkotler