File:Zstr count x86 assembly.png
Original file (945 × 467 pixels, file size: 133 KB, MIME type: image/png)
Captions
Summary
[edit]DescriptionZstr count x86 assembly.png |
English: zstr_count function that implemented using x86 assembly |
Date | |
Source | https://en.wikipedia.org/w/index.php?title=Assembly_language&action=edit§ion=20 |
Author | OldCodger2 |
Original source code text
[edit]
00000030 B9FFFFFFFF
00000035 41
00000036 803C0800
0000003A 75F9
0000003C C3
|
;-----------------------------------------------------------
; zstr_count:
; Counts a zero-terminated ASCII string to determine its size
; in: eax = start address of the zero terminated string
; out: ecx = count = the length of the string
zstr_count: ; Entry point
mov ecx, -1 ; Init the loop counter, pre-decrement
; to compensate for the increment
.loop:
inc ecx ; Add 1 to the loop counter
cmp byte [eax + ecx], 0 ; Compare the value at the string's
; [starting memory address Plus the
; loop offset], to zero
jne .loop ; If the memory value is not zero,
; then jump to the label called '.loop',
; otherwise continue to the next line
.done:
; We don't do a final increment,
; because even though the count is base 1,
; we do not include the zero terminator in the
; string's length
ret ; Return to the calling program
|
Licensing
[edit]Public domainPublic domainfalsefalse |
This work has been released into the public domain by its author, OldCodger2. This applies worldwide. In some countries this may not be legally possible; if so: |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 00:23, 19 January 2016 | 945 × 467 (133 KB) | Cedar101 (talk | contribs) | {{subst:Upload marker added by en.wp UW}} {{Information |Description = {{en|zstr_count function that implemented using x86 assembly}} |Source = {{own}} |Date = 2016-01-19 |Author = Cedar101 }} |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Image width | 945 px |
---|---|
Image height | 467 px |