Changeset 621 in xtideuniversalbios for trunk/Assembly_Library/Src/String
- Timestamp:
- Nov 21, 2021, 2:15:32 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/String/String.asm
r619 r621 79 79 ; CX: Number of characters copied 80 80 ; SI,DI: Updated by CX characters 81 ; CF: Cleared 81 82 ; Corrupts registers: 82 83 ; Nothing … … 90 91 .CopyNextCharacter: 91 92 lodsb ; Load from DS:SI to AL 92 test al, al ; NULL to end string? 93 jz SHORT .EndOfString93 test al, al ; NULL to end string? (Clears CF) 94 jz SHORT PopAXandReturn 94 95 stosb ; Store from AL to ES:DI 95 96 inc cx ; Increment number of characters written 96 97 jmp SHORT .CopyNextCharacter 97 98 ALIGN STRING_JUMP_ALIGN99 .EndOfString:100 pop ax101 ret102 98 103 99 … … 126 122 stc 127 123 sbb cx, si ; Subtract NULL 124 PopAXandReturn: 128 125 pop ax 129 126 ret
Note:
See TracChangeset
for help on using the changeset viewer.