x86 Assembly

Moderators: None (Apply to moderate this forum)
Number of threads: 4556
Number of posts: 16011

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Recommended ASM 80x86 Reference :: ASM Posted by kuphryn on 16 Sept 2002 at 7:57 PM
Hi.

I began learning ASM programming a couple of weeks ago. I really enjoy 16bit ASM programming, although I prefer C++. Nonetheless, ASM forces me to appreciate higher level level including C++. It would be nice to be able to disassembly any program and see what really goes on under the binary code.

What is a good reference book covering 16bit and 32bit 80x86 ASM programming?

Thanks,
Kuphryn
Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by Darius on 16 Sept 2002 at 10:53 PM
This message was edited by Darius at 2002-9-16 22:59:50

: Hi.
:
: I began learning ASM programming a couple of weeks ago. I really enjoy 16bit ASM programming, although I prefer C++. Nonetheless, ASM forces me to appreciate higher level level including C++. It would be nice to be able to disassembly any program and see what really goes on under the binary code.
:
: What is a good reference book covering 16bit and 32bit 80x86 ASM programming?
:
: Thanks,
: Kuphryn
:

The Art of Assembly (there's a DOS, Win32, and Linux version). I recommend reading the DOS version first. The Linux and Win32 versions are identical (to each other, not to the DOS version) last I checked. Anyways, the URL webster.ucr.edu.

"We can't do nothing and think someone else will make it right."
-Kyoto Now, Bad Religion



Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by kuphryn on 17 Sept 2002 at 7:30 AM
Okay. Thanks.

Most responses I received mentionee "The Art of Assembly." I will definitely print a copy, read it, and learn about ASM via "The Art of Assembly."

Kuphryn
Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by Celtak on 17 Sept 2002 at 11:04 AM
I also want to learn 32-bit assmebly...
I am an experience C++ coder, and love working in C++.. but i feel that assembly for X86 would be a nice touch to learn....

Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by kuphryn on 17 Sept 2002 at 1:03 PM
Yeah. ASM programming is fun. Part of the fun has to do with the fact that you know what is going on whereas with C/C++ you depend more on the compiler.

32bit ASM should be exciting too, although I am learning 16bit ASM righ tnow.

Kuphryn
Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by kuphryn on 18 Sept 2002 at 2:44 PM
What are some important differences between 16bit ASM programming and 32bit ASM programming?

I am studying 16bit ASM because I feel it is the foundation for 32bit ASM. At least that is how programming with high-level languages work. For example, we learn C/C++ before learning Win32 API and MFC.

Kuphryn
Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by Darius on 18 Sept 2002 at 7:11 PM
: What are some important differences between 16bit ASM programming and 32bit ASM programming?
:
: I am studying 16bit ASM because I feel it is the foundation for 32bit ASM. At least that is how programming with high-level languages work. For example, we learn C/C++ before learning Win32 API and MFC.
:
: Kuphryn
:

That's because you can't program Win32 API or MFC without first knowing C/C++. The same is definitely not true of 16-bit and 32-bit x86 assembly. 32-bit assembly isn't 'on top of' 16-bit assembly as MFC is a layer above C++.

16-bit assembly is actually more difficult than 32-bit assembly (well more 'more of a pain in the ass', than 'more difficult'). Really the main difference is memory layout. 32-bit application level code usually has one giant flat memory layout.

However, typically 32-bit application level code doesn't have direct access to the hardware. If you want to mess around with hardware (for your own entertainment and education) then typically using 16-bit DOS is easiest (the alternative would be to write device driver code).

"We can't do nothing and think someone else will make it right."
-Kyoto Now, Bad Religion

Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by kuphryn on 18 Sept 2002 at 7:16 PM
Interesting. Thanks.

Kuphryn
Report
Art of Assembly Posted by weedsmoka on 20 Sept 2002 at 2:17 AM
Report
Re: Art of Assembly Posted by kuphryn on 20 Sept 2002 at 7:44 AM
Thanks.

Kuphryn
Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by emu8086 on 20 Sept 2002 at 11:17 AM
for 16bit ASM programming you may be interested in emu8086:

emu8086 combines an advanced source editor, assembler, disassembler, software emulator (Virtual PC) with debugger, and step by step tutorials.

http://www.programmersheaven.com/search/download.asp?FileID=20562
Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by kuphryn on 20 Sept 2002 at 12:02 PM
Wow! Nice!!!

emu8086 could be the Windows ASM editor and compiler I am searching for. Do you need MASM for emu8086 to work? How does it compare to MASM and CodeView?

Thanks,
Kuphryn


Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by emu8086 on 21 Sept 2002 at 3:44 AM
: Wow! Nice!!!
:
: emu8086 could be the Windows ASM editor and compiler I am
: searching for.

: Do you need MASM for emu8086 to work?

- No, emu8086 has everything you may need, editor, assembler and
even 8086 microprocessor simulator (this enables to see what
happens inside CPU).

: How does it compare to MASM and CodeView?

- emu8086 was designed as a learning tool, it has pure Windows
interface. See "MASM / TASM compatibility" in
"emu8086 reference" for more info.


Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by kuphryn on 21 Sept 2002 at 9:22 AM
Thanks.

I installed emu8086 and tried to compile a 16-bit ASM source code I designed using MASM 6.15 and CodeView debugger. emu8086 would not compiler it. It displayed a long list of errors.

Is emu8086 compatible with 16-bit MASM ASM?

Kuphryn
Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by emu8086 on 26 Sept 2002 at 11:09 AM

: Is emu8086 compatible with 16-bit MASM ASM?


- I may say not fully compatible. May we see your source?




Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by kuphryn on 26 Sept 2002 at 3:32 PM
Sure. Here is one of the problem I worked on from the ASM book I studied from.

-----
;-----------------------------------------------;
; ;
; ASM Code: c14pp141.asm ;
; Developer: Kuphryn ;
; Platform: x86 16bits DOS Assembly ;
; Compiled: September 23, 2002 - MASM 6.15 ;
; Misc: Calculates Fibonacci Number using ;
; multiple precision arithmetic. ;
; ;
;-----------------------------------------------;

INCLUDE PCMAC.INC
.MODEL SMALL
.586 ; Indicates support for Pentium chip.

.STACK 100h

.DATA
CR EQU 13
LF EQU 10
ProMsg DB CR, LF, 'Multi Precision Fibonacci', CR, LF, '$'
NMsg DB CR, LF, 'Enter a number: $'
FMsg DB CR, LF, 'Fib: $'
NNum DW 0
FibNum0 DD 0
FibNum1 DD 0
SumNum0 DD 0
SumNum1 DD 0
PreNum0 DD 0
PreNum1 DD 0

.CODE
EXTRN GetDec : NEAR, PutDDec : NEAR

Program PROC
mov ax, @data ; Copy data address to register.
mov ds, ax ; Copy register ax to data register.
mov dx, OFFSET ProMsg
mov ah, 9h ; Display text message.
int 21h ; Call DOS.
_PutStr NMsg ; Ask for a number to cal. Fib.
call GetDec ; Get number input.
mov NNum, ax
call CalFib ; Call function to cal. Fib.
_PutStr FMsg
cmp FibNum1, 0
je OutFN1
mov eax, FibNum1
call PutDDec

OutFN1:
mov eax, FibNum0
call PutDDec

PEnd:
mov al, 0 ; Return 0.
mov ah, 4ch ; Exit to DOS
int 21h
Program ENDP

;--------------;

CalFib PROC
CFBeg:
cmp NNum, 0
jl CFLess
cmp NNum, 1
jg CFLp
mov ax, NNum
mov FibNum0, eax
jmp CFEnd

CFLess:
mov NNum, 0
jmp CFEnd

CFLp:
mov FibNum0, 1
sub NNum, 1
mov cx, NNum

CFLoop:
mov eax, FibNum0
add eax, PreNum0
mov SumNum0, eax
mov eax, FibNum1
adc eax, PreNum1
mov SumNum1, eax
mov eax, FibNum0
mov PreNum0, eax
mov eax, FibNum1
mov PreNum1, eax
mov eax, SumNum0
mov FibNum0, eax
mov eax, SumNum1
mov FibNum1, eax
dec cx
jnz CFLoop

CFEnd:
ret
CalFib ENDP

;--------------;

END Program
-----

Kuphryn
Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by emu8086 on 27 Sept 2002 at 3:01 AM
Well, this is not 16 bit assembly!!!!

for example: "mov FibNum0, eax"
EAX - is 32 bit register!

emu8086, is emulator of Intel's 8086 microprocessor.
This microprocessor has no EAX register!

only AX, CX, DX...
Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by kuphryn on 27 Sept 2002 at 7:59 AM
Okay. I have tried to compile other source 16-bit ASM source code using emu8086 too. It outputed the same errors.

Kuphryn
Report
Re: Recommended ASM 80x86 Reference :: ASM Posted by emu8086 on 27 Sept 2002 at 8:14 AM
OK. Please let us see the source, just in case :)

Report
MASM/TASM against emu8086 Posted by emu8086 on 27 Sept 2002 at 8:25 AM
You may be interested in MASM/TASM compatibility with emu8086:

http://www.geocities.com/emu8086/Help/compatibility.html





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.