Slide 4.7: INCLUDE directive Slide 4.9: Instructions Home |
.CODE
, .DATA
, .STACK
, and PROC
Directives
.CODE
identifies the area of a program that contains instructions.
.DATA
identifies the area of a program that contains variables.
.STACK
, which can be hidden by using INCLUDE Irvine32.inc
, holds procedure parameters and local variables.
PROC
identifies the beginning of a procedure, e.g.,
main PROC
where the procedure name is main
, which is also the startup procedure.
WriteString
(textbook page 124)
It writes a null-terminated string to standard output. When calling it, place the string's offset in EDX register. The hexadecimal bytes 0Dh and 0Ah are end-of-line characters.
|
|
|
ReadHex
(textbook page 121)It reads a 32-bit hexadecimal integer from standard input, terminated by the Enter key, and returns the value in EAX register.
|
WriteHex
(textbook pages 123 – 124)It writes a 32-bit unsigned integer to standard output in 8-digit hexadecimal format. Leading zeros are inserted if necessary. Before calling it, place the integer in EAX register.
|
|