Index
S
SAL instruction, 466
SAM.TEXT program, 108-117
SAR instruction, 466
SBB instruction, 582
scale, of address, 426, 463
scaled indexed addressing, 426, 506-507
scanf function, 478-482
screen clearing procedure, 278-281, 288, 372
scrolling, 278, 279, 281-282
SECTION commands, 230-231
sections, in programs, 231
sectors, 77-79
seed value, 491, 492
segment(s), of memory, 160, 162-166
public, 291-295
and real mode flat model, 229
and real mode segmented model, 242-243
segment address, 162-168, 203
in instruction pointer, 173
in real mode segmented model, 177-178, 207
for video refresh buffer, 185, 187
SEGMENT directive, 242, 245, 249, 250
segment override prefixes, 205-207, 595, 599
segment registers, 154-157, 167-168, 182, 243
and bitwise logical instructions, 322
examining from DEBUG, 183
and Linux, 455
for memory data, 205-207
moving, 208
in protected mode flat model, 180-181
in real mode flat model, 176, 207, 229, 243, 249, 371
in real mode segmented model, 178-179, 243, 371
serial-access devices, 55
services dispatcher, for DOS, 259-261
shift instructions, 316, 323, 375, 465-466
multiplying with, 350
SHL instruction, 316, 323, 349-350, 382, 466, 583-584
SHOWARGS.ASM program, 507-508
SHOWCHAR.ASM program, 383, 388-396
SHR instruction, 316, 323, 375, 466, 585-586
shutdown code, 460, 505
sign bit, 218
signed displacement, 215, 426
signed values, 337-339
Sign flag (SF), 218, 222, 335, 339, 533
silicon chips, 53-57, 63, 69
single inline memory module (SIMM), 54, 59
software development, 74
open-source, 91
tools for, 119
software interrupt:for BIOS services, 277-287
to call Linux kernel, 453
for DOS services, 236, 256-265
versus procedure call, 272
source code, 76
managing complexity of, 414
reuse of, 90, 101-102
for subroutines, 518
source code files:assembler handling of, 85, 96-100, 234
in C, 410-411
comments in, 229-230
and dependencies, 416-418
errors in, 98, 104
extension for, 96
free, 408
from gcc, 423-425
macros in, 302, 303, 306, 308
in NASM-IDE edit window, 123
size of, 228
text editor for, 82, 83
translation to binary files, 84
source index (SI) register, 169, 172, 203, 207, 322, 357, 372, 595, 596, 599
source operand, 198, 199
source string, 371-372
SP (stack pointer) register, 172, 178, 207, 248, 595, 599
srand function, 491-497
sscanf function, 510-511
SS (stack segment) register, 168, 178, 206, 248-249, 322, 595, 596, 599
stack, 168, 177, 178, 205, 242, 247-255
accessing relative to EBP, 504-509
and addresses in DOS, 260-264
and addresses in Unix, 427
cleaning up, 475, 517
and C library function arguments, 474-476
LIFO (last in, first out), 248, 255
popping data from, 252-255, 265
and procedure calls, 272-275, 455, 457
pushing data on, 251-252, 465
reserving space in, 250, 275
stack crash, 250, 252, 274-275
stack frame, 458-461
stack segment, 242-243, 245, 248-250
Stallman, Richard, 91, 408, 409
standard error (stderr), 471, 477
standard input (stdin), 471, 477
standard output (stdout), 235, 359, 470-472, 477, 511-512
start address, 245, 291
startup code, for Linux, 429, 435, 460
STC instruction, 587
STD instruction, 376, 588
STI instruction, 218
storage, 11
to different memory areas, 388
on disk, 77-78
mass, 55
short-term (stack), 255
temporary (registers), 65, 255
STOS instruction, 589, 596
STOSW instruction:and nested instruction loops, 392-396
with REP, 372-376
without REP, 377-387, 393
stream, definition of, 471
string(s), 232-233
addressing, 425
in assembly language, 369-372
converting numbers to, 325
definition of, 232, 371
delineation of, 233
length of, 358-359
string instructions, 369, 372, 376, 397. See also specific string instructions
string space, 370
string variables, 232-233
strtod function, 510
struct, 483
SUB instruction, 346, 590-591
subroutines, in C, 454, 503-504
libraries of, 518-519
switches, 50, 51, 69-70
synonyms, for mnemonics, 336-339
syntax, 209-210
AT&T, 413, 422-427
system crashes, 103, 252, 467-468