Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assembly, the meaning behind the colon ":"

Tags:

assembly

tasm

I'm new to assembly and I'm currently reading a guide that would frequently express things like ax:bx, ds:dx, ss:sp.

I'll use one of the above in an example from the book "Mastering Turbo Assembly" Page 85.

Notice that the logical address in ss:sp points to the byte below the last byte in the stack.

What is the meaning of the : notation?

Kind regards.

like image 334
Wobit Nyen Avatar asked Jul 19 '13 13:07

Wobit Nyen


People also ask

What does colon mean in assembly?

A colon separates the assembler template from the first output operand and another separates the last output operand from the first input, if any. Commas separate the operands within each group.

How are labels named in assembly language?

The names used for labels in assembly language programming consist of alphabetic letters in both upper and lower case, the digits 0 through 9, and the special characters question mark (?), period (.), at (@), underline (_), and a dollar sign ($). The first character of the label must be an alphabetic character.

How do you comment in assembly language?

In assembly, comments are usually denoted by a semicolon ; , although GAS uses # for single line comments and /* … */ for block comments possibly spanning multiple lines.

What does CMP return assembly?

The CMP instruction subtracts the value of Operand2 from the value in Rn . This is the same as a SUBS instruction, except that the result is discarded. The CMN instruction adds the value of Operand2 to the value in Rn . This is the same as an ADDS instruction, except that the result is discarded.


1 Answers

Those are memory addresses expressed in the segment:offset scheme. See e.g. http://thestarman.pcministry.com/asm/debug/Segments.html

like image 169
Ulrich Schmidt-Goertz Avatar answered Sep 28 '22 04:09

Ulrich Schmidt-Goertz