Knowledge (XXG)

Direction flag

Source 📝

22: 345: 157:
This flag is used to determine the direction ('forward' or 'backward') in which several bytes of data will be copied from one place in the
338: 105: 161:, to another. The direction is important mainly when the original data position in memory and the target data position overlap. 39: 386: 177: 86: 43: 58: 331: 65: 32: 567: 442: 135: 72: 541: 411: 371: 214: 166: 536: 54: 460: 401: 311: 436: 531: 448: 366: 189: 79: 526: 454: 381: 516: 499: 484: 419: 396: 253: 173: 139: 561: 504: 430: 151: 391: 376: 300: 185: 21: 489: 479: 123: 509: 203:) — the string is processed from highest to lowest address. This is called 172:) — it means that string is processed beginning from lowest to highest 323: 521: 199:
In case it is set to 1 (using the set-direction-flag instruction
424: 315: 327: 546: 158: 147: 143: 15: 470: 410: 359: 301:
3.8.1 Carry and Direction Flag Control Instructions
46:. Unsourced material may be challenged and removed. 165:If it is set to 0 (using the clear-direction-flag 339: 8: 346: 332: 324: 106:Learn how and when to remove this message 210: 293: 7: 44:adding citations to reliable sources 14: 20: 31:needs additional citations for 387:Low-level programming language 1: 584: 274:highest-to-lowest address 138:processing, stored in the 443:Microsoft Macro Assembler 224: 221: 218: 213: 372:Comparison of assemblers 461:Open Watcom Assembler 402:x86 assembly language 246:clear direction flag 232:of string processing 196:) will increase them; 542:Instruction listings 40:improve this article 537:Calling conventions 437:High Level Assembly 354:x86 assembly topics 268:set direction flag 532:Processor register 258:auto-incrementing 252:lowest-to-highest 126:that controls the 555: 554: 449:Netwide Assembler 367:Assembly language 285: 284: 205:auto-decrementing 190:destination index 182:auto-incrementing 116: 115: 108: 90: 575: 568:X86 architecture 348: 341: 334: 325: 318: 309: 303: 298: 265: 243: 211: 202: 195: 171: 111: 104: 100: 97: 91: 89: 55:"Direction flag" 48: 24: 16: 583: 582: 578: 577: 576: 574: 573: 572: 558: 557: 556: 551: 527:Program counter 472: 466: 455:Turbo Assembler 406: 382:Instruction set 355: 352: 322: 321: 310: 306: 299: 295: 290: 263: 241: 215:x86-instruction 200: 193: 184:mode. Both the 180:mode is called 169: 112: 101: 95: 92: 49: 47: 37: 25: 12: 11: 5: 581: 579: 571: 570: 560: 559: 553: 552: 550: 549: 544: 539: 534: 529: 524: 519: 517:Memory address 514: 513: 512: 507: 502: 500:Interrupt flag 497: 495:Direction flag 492: 482: 476: 474: 468: 467: 465: 464: 458: 452: 446: 440: 434: 428: 425:Flat Assembler 422: 416: 414: 408: 407: 405: 404: 399: 397:Microassembler 394: 389: 384: 379: 374: 369: 363: 361: 357: 356: 353: 351: 350: 343: 336: 328: 320: 319: 312:Direction Flag 304: 292: 291: 289: 286: 283: 282: 275: 272: 269: 266: 260: 259: 256: 250: 247: 244: 238: 237: 234: 227: 226: 223: 220: 217: 209: 208: 197: 140:FLAGS register 120:direction flag 114: 113: 28: 26: 19: 13: 10: 9: 6: 4: 3: 2: 580: 569: 566: 565: 563: 548: 545: 543: 540: 538: 535: 533: 530: 528: 525: 523: 520: 518: 515: 511: 508: 506: 505:Overflow flag 503: 501: 498: 496: 493: 491: 488: 487: 486: 483: 481: 478: 477: 475: 469: 462: 459: 456: 453: 450: 447: 444: 441: 438: 435: 432: 431:GNU Assembler 429: 426: 423: 421: 418: 417: 415: 413: 409: 403: 400: 398: 395: 393: 390: 388: 385: 383: 380: 378: 375: 373: 370: 368: 365: 364: 362: 358: 349: 344: 342: 337: 335: 330: 329: 326: 317: 313: 308: 305: 302: 297: 294: 287: 281:decrementing 280: 276: 273: 270: 267: 262: 261: 257: 255: 251: 248: 245: 240: 239: 235: 233: 229: 228: 216: 212: 206: 198: 191: 187: 183: 179: 175: 168: 164: 163: 162: 160: 155: 153: 149: 145: 141: 137: 134:direction of 133: 132:right-to-left 129: 128:left-to-right 125: 121: 110: 107: 99: 96:December 2018 88: 85: 81: 78: 74: 71: 67: 64: 60: 57: –  56: 52: 51:Find sources: 45: 41: 35: 34: 29:This article 27: 23: 18: 17: 494: 392:Machine code 377:Disassembler 307: 296: 278: 231: 204: 186:source index 181: 178:instructions 156: 146:-compatible 131: 127: 119: 117: 102: 93: 83: 76: 69: 62: 50: 38:Please help 33:verification 30: 471:Programming 236:Mode title 167:instruction 490:Carry flag 480:Call stack 412:Assemblers 288:References 230:Direction 152:bit number 66:newspapers 547:Registers 510:Zero flag 150:. It is 562:Category 420:A86/A386 219:Meaning 254:address 176:; such 174:address 142:on all 80:scholar 522:Opcode 473:issues 463:(WASM) 457:(TASM) 451:(NASM) 445:(MASM) 427:(FASM) 360:Topics 225:Notes 192:(like 159:memory 136:string 82:  75:  68:  61:  53:  485:Flags 439:(HLA) 433:(GAS) 222:Flag 207:mode. 122:is a 87:JSTOR 73:books 316:MSDN 277:auto 194:MOVS 188:and 154:10. 148:CPUs 124:flag 118:The 59:news 314:at 264:STD 242:CLD 201:STD 170:CLD 144:x86 130:or 42:by 564:: 271:1 249:0 347:e 340:t 333:v 279:- 109:) 103:( 98:) 94:( 84:· 77:· 70:· 63:· 36:.

Index


verification
improve this article
adding citations to reliable sources
"Direction flag"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
flag
string
FLAGS register
x86
CPUs
bit number
memory
instruction
address
instructions
source index
destination index
x86-instruction
address
3.8.1 Carry and Direction Flag Control Instructions
Direction Flag
MSDN
v
t

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.