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.
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.
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.
In assembly, comments are usually denoted by a semicolon ; , although GAS uses # for single line comments and /* … */ for block comments possibly spanning multiple lines.
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.
Those are memory addresses expressed in the segment:offset scheme. See e.g. http://thestarman.pcministry.com/asm/debug/Segments.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With