- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
getword:
push ebx ecx esi edi
cmp al, ' '
jbe .be
mov byte [.b1], 0x74
mov byte [.b2], 0x74
jmp .start
.be:
mov byte [.b1], 0x73
mov byte [.b2], 0x73
.start:
mov edi, _tib
mov ebx, edi
add ebx, [_ntib]
add edi, [_toin]
.l1:
cmp edi, ebx
jae .l3
scasb
.b1:jae .l1
mov esi, edi
mov edi, [_here]
inc edi
dec esi
xor ecx, ecx
.l2:
cmp esi, ebx
jae .l3
cmp al, [esi]
.b2:jae .l3
movsb
inc ecx
jmp .l2
.l3:
mov eax, [_here]
mov [eax], cl
sub esi, _tib - 1
mov [_toin], esi
pop edi esi ecx ebx
ret