编辑代码

section	.text
	global _start       ;must be declared for using gcc
_start:                     ;tell linker entry point
mov ecx,slength;第14行,8
lea esi,string
mov ebx,0;有效长度
mov edx,slength;现有长度
xor eax,eax
again: cmp byte [eax+esi],' '
 jz func
 cmp byte [eax+esi],'9'
 ja out
 cmp byte [eax+esi],'0'
 jb out
 
func:
dec edx
jmp there
out:
mov al,byte [esi+eax]
mov byte [esi+ebx],al
inc ebx
there:
inc eax
loop again;call kernel

mov ah,1
mov dx,string
int 21



section	.data

string	db	'        ABC123      ',0xa	;our dear string
slength equ $-string		;length of our dear string