Talk:X86 Assembly
From Wikibooks, the open-content textbooks collection
Contents |
[edit] Templates
I have created a few templates for writing ASM instructions:
Which will display assembly instructions with 0, 1 and 2 operands, respectfully.
This template goes at the top of every page in the book, for uniformity.
This template marks a page in this book as being a stub.
--Whiteknight (talk) (current) 19:08, 14 December 2005 (UTC)
[edit] Overhaul
I've completely overhauled this page, and moved the information into neat subpages which are more manageable. I have also moved the page from "Programming:x86 Assembly" to simply x86 Assembly, and have instituted the "forward-slash" naming convention for subpages. --Whiteknight (talk) (current) 21:09, 8 December 2005 (UTC)
[edit] Ask for Help
Would someone please work on this page. It's a good quick start guide at most right now, but to a newcomer to assembly like myself, it gives little info. The the example for mov for instance is more advanced than what is previously talked about. There isn't any details about syntax before that point. I get the gist of it, but it would be better for someone to add a section before that some time which gives a very basic program and gives details of what each line does and if it's always needed or platform specific (say from Windows to Linux to 16 bit Dos even.)
--HarleyL 13:42, 12 Apr 2005 (UTC)
When I came to this book a month ago seeking to learn NASM, I didn't get much out of it. When I returned recently, I realized there is a fair bit of info here, but it's mostly in a reference book format. What do people think about turning section 2 into the big thrust -making lesson plans for each of the mentioned assemblers- and then moving the rest to the back as appendices? Gabriel Lein 15:05, 14 April 2006 (UTC)
In X86 Assembly/X86 Architecture#Addressing_modes, what is the difference between base displacement and direct offset addressing?
[edit] Reverse Engineering Wikibook
I have added some links from the book I've been working on, Reverse Engineering to point to this page. It would be nice if this book was beefed up a little bit, and maybe if it included at least some info on Intel syntax as well, because the RE book uses mostly Intel. If nobody else jumps on to this task, i might work on it some myself. --Whiteknight 01:27, 3 October 2005 (UTC)
[edit] Other resources
I'm not sure if anyone is interested, but there is a guide on the same topic at http://www.drpaulcarter.com/pcasm/. downloadable as PDF or POSTSCRIPT, 195 pages long.
203.51.107.3 05:29, 27 March 2006 (UTC)
RiRi Weissenhower
[edit] Link Edit
added the link to the wikipedia article on processor registers --Jikanter 19:57, 6 August 2006 (UTC)
[edit] Order of second byte
I have done some study recently via ICY Hexplorer and an x86 ASM help file, and I noticed that for the second byte whoever wrote it had it somewhat reversed. It was originally Mod-Reg-R/M, whereas it's actually Mod-R/M-Reg, so I changed it to be so, as well as changed the hexadecimal representation of it. I hope nobody minds, as I just found an error and had to correct it.
[edit] Context switching?
Some information on context switching would be interesting 69.31.174.216 21:54, 27 July 2007 (UTC)
[edit] "Print this string" MBR / GNU AS?
I use GNU AS (+"objcopy -O binary" to get raw content) and because here sadly isn't any mbr examples for it here and this place feels so awkwardly quiet anyway that I just have to say something I'll bother you with this question I might solve myself too. So, I have the following:
.code16 Start: xor %bh, %bh; mov $0xe, %ah; mov String, %si; Print: movb %cs:(%bp, %si), %al; cmp %al, '\0; je Infin; int $0x10; inc %si; jmp Print; Infin: jmp Infin; String: .ascii "Insert string here\0"
The problem is that the label addresses aren't based on 0x7c00 and I don't know what to do to get them so. Also, is there some shorter way of doing this? --212.149.216.233 (talk) 15:30, 12 March 2008 (UTC)
- You need one conditional branch to exit the loop.
- You also need a branch at the end of the loop to return to the top of the loop.
- Does that mean you need two branch instructions in the loop?
- Often assembly language programmers put the conditional branch at the end of the loop -- then they only need one branch instruction in the loop, rather than two.
- Smart assembly language programmers use subroutines that have already been written and tested.
- Does the following example answer your questions? --DavidCary (talk) 05:54, 24 March 2009 (UTC)
; "Hello World" program from http://hem.passagen.se/danma/asmprog.htm ; This is a DOS program => it's loaded at address 0x100 ; The address is needed by Nasm, so it can calculate the pointer values. ; To give Nasm the address, you use the command ORG: [ORG 0x100] mov ah, 9 ; Print String mov dx, msg ; (DX=Pointer to msg) int 0x21 ; mov ax, 0x4C00 ; Terminate program int 0x21 ; msg db 'Hello World!$' ; Insert the message.. A string ending in "$"
[edit] Copyright of intel - amd developers manuals.
Hi. I'm writing a x86 assembly manual for el.wikibooks. I use as reference the intel-amd developer manuals and i was wondering to what extent there could be a copyright problem in using material from those manuals.