Does anyone know a good assembler textbook ?

  • Thread starter Thread starter Klizja
  • Start date Start date
  • Tags Tags
    Textbook
Click For Summary

Discussion Overview

The discussion revolves around recommendations for assembler textbooks, specifically those that cover string manipulation in detail. Participants also explore which assembler might be easiest for beginners with prior experience in C and Pascal.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant requests suggestions for a good assembler textbook that includes detailed coverage of string manipulation.
  • Another participant notes that there is no single assembler, as each processor has its own instruction set, suggesting the need for specificity.
  • A suggestion is made to download architecture specifications from AMD or Intel for those learning assembler for their architectures.
  • One participant mentions finding numerous online resources by searching for "assembler textbook."
  • Concerns are raised about the existence of built-in string manipulation handlers in assembly, with a participant questioning their availability.
  • A later reply details specific x86 instructions related to string manipulation, including REP MOVSB and REPNE SCASB, and clarifies the use of registers in different modes.
  • Further corrections are provided regarding the specifics of the x86 instruction set and the correct register names for various modes.

Areas of Agreement / Disagreement

Participants express differing views on the availability and handling of string manipulation in assembly language, with some questioning its practicality while others provide technical details about existing instructions. No consensus is reached on the best resources or approaches for learning assembler.

Contextual Notes

The discussion highlights the need for clarity regarding the specific assembler and architecture being referenced, as well as the potential limitations of available resources in addressing string manipulation in assembly.

Klizja
Messages
9
Reaction score
0
Does anyone know a good assembler textbook ?! :)

Hello , everyone :)

Could anyone suggest a good assembler textbook ? It would be nice , if it covered working with strings in detail , a tutorial about working with strings would also do nicely :)

Thank you in advance :)

P.S. Oh , and by the way , which assembler is the easiest to use if you are completely new to the area of assembler programming , however have some experience of coding in C and Pascal :)
 
Last edited:
Technology news on Phys.org


There is no one assembler - each processor has its own set of instructions, so you have to be more specific.
 


If you are learning say assembler for the AMD/Intel architectures you might be better off just downloading the architecture specifications from the respective vendors website.
 


Do a search on "assembler textbook". I got a lot of hits, including some books that are published online.
 


Granted, the last assembly I wrote was for an Analog Devices DSP, and before that 8086 assembly-- but ... strings? In assembly? Are there built-in handlers for string manipulation in assembly these days?

DaveE
 


davee123 said:
Granted, the last assembly I wrote was for an Analog Devices DSP, and before that 8086 assembly-- but ... strings? In assembly? Are there built-in handlers for string manipulation in assembly these days?
x86 has instructions for Pascal type strings. REP MOVSB will move a string of length CX bytes from DS:ESI to ES:ESI. REPNE SCASB searches a string of length CX bytes at ES:ESI for the first occurrence of a match with AL. REPE CMPSB wll compare two strings of length CX bytes at DS:ESI and ES:EDI. EDI and ESI are register pointer names in 32 bit mode. In 64 bit mode, the register pointer names would be RDI and RSI, in 16 bit mode, just DI and SI.
 
Last edited:


rcgldr said:
x86 has instructions for Pascal type strings. REP MOVSB will move a string of length CX bytes from DS:ESI to ES:ESI.
Correction: From Intel® 64 and IA-32 Architectures
Software Developer’s Manual, Volume 2B:
(For legacy mode) REP MOVSB moves a string of (E)CX bytes from address DS:(E)SI to ES:(E)DI. For 64-bit mode move byte from address (R|E)SI to (R|E)DI.

The SI, ESI, and RSI registers (16 bits, 32 bits, and 64 bits, respectively) are source index registers, hence their name. The DI, EDI, and RDI registers are destination index registers.
rcgldr said:
REPNE SCANSB searches a string of length CX bytes at ES:ESI for the first occurrence of a match with AL.
The instruction names are SCASB, SCASW, and SCASD - no N in the name.
rcgldr said:
REPE CMPSB wll compare two strings of length CX bytes at DS:ESI and ES:EDI. EDI and ESI are register pointer names in 32 bit mode. In 64 bit mode, the register pointer names would be RDI and RSI, in 16 bit mode, just DI and SI.
 

Similar threads

Replies
16
Views
4K
Replies
6
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 14 ·
Replies
14
Views
5K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 47 ·
2
Replies
47
Views
7K
Replies
60
Views
18K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
6
Views
3K