fork download
  1. data segment
  2. src db "MADAM$"
  3. dst db 5 dup("$")
  4. n db 5
  5. m1 db "Palindrome$"
  6. m2 db "Not Palindrome$"
  7. data ends
  8.  
  9. code segment
  10. assume cs:code,ds:data
  11. start: mov ax,data
  12. mov ds,ax
  13. lea si,src
  14. lea di,dst
  15. add si,4
  16. mov cl,n
  17. l1: mov al,[si]
  18. mov [di],al
  19. inc si
  20. dec di
  21. dec cl
  22. jmp l1
  23.  
  24. lea si,src
  25. lea di,dst
  26. mov cl,n
  27. l2:mov al,[si]
  28. cmp al,[di]
  29. jne l3
  30. inc si
  31. inc di
  32. dec cl
  33. jmp l2
  34.  
  35. lea dx,m1
  36. mov ah,09h
  37. int 21h
  38. jmp lst
  39.  
  40. l3: lea dx,m2
  41. mov ah,09h
  42. int 21h
  43. lst:mov ah,4ch
  44. int 21h
  45.  
  46. code ends
  47. end start
  48.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.asm:1: error: parser: instruction expected
prog.asm:3: error: comma expected after operand 1
prog.asm:7: error: symbol `data' redefined
prog.asm:7: error: parser: instruction expected
prog.asm:9: error: parser: instruction expected
prog.asm:10: error: parser: instruction expected
prog.asm:17: error: impossible combination of address sizes
prog.asm:17: error: invalid effective address
prog.asm:18: error: impossible combination of address sizes
prog.asm:18: error: invalid effective address
prog.asm:27: error: impossible combination of address sizes
prog.asm:27: error: invalid effective address
prog.asm:28: error: impossible combination of address sizes
prog.asm:28: error: invalid effective address
prog.asm:46: error: symbol `code' redefined
prog.asm:46: error: parser: instruction expected
prog.asm:47: error: parser: instruction expected
ld: cannot find prog.o: No such file or directory
stdout
Standard output is empty