fork download
  1. .model flat, c
  2.  
  3. .data
  4. s db "123abc4565jk-"
  5. s_len = $ - s
  6.  
  7. result db s_len dup(?)
  8.  
  9. .code
  10.  
  11. digits_only proc
  12. mov esi, offset s
  13. mov ecx, s_len
  14. mov edi, offset result
  15. xor eax, eax
  16. check:
  17. lodsb
  18. mov ebx, eax
  19. sub ebx, '0'
  20. cmp ebx, 9
  21. ja next
  22. stosb
  23. next:
  24. loop check
  25. mov byte ptr [edi], 0
  26. ret
  27. digits_only endp
  28. end
  29.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.asm:1: error: attempt to define a local label before any non-local labels
prog.asm:1: error: parser: instruction expected
prog.asm:3: error: attempt to define a local label before any non-local labels
prog.asm:5: error: parser: instruction expected
prog.asm:7: error: comma expected after operand 1
prog.asm:11: error: parser: instruction expected
prog.asm:12: error: comma, colon or end of line expected
prog.asm:14: error: comma, colon or end of line expected
prog.asm:25: error: comma, colon or end of line expected
prog.asm:27: error: symbol `digits_only' redefined
prog.asm:27: error: parser: instruction expected
stdout
Standard output is empty