fork download
  1. CSEG segment
  2. org 100h
  3.  
  4. start:
  5. mov ax, 3D02h
  6. mov dx, offset just_file
  7. int 21h
  8. jc err
  9. ok:
  10. mov dx, offset msg_ok
  11. mov ah, 9h
  12. int 21h
  13. int 20h
  14. err:
  15. mov dx, offset msg_err
  16. mov ah, 9h
  17. int 21h
  18. int 20h
  19.  
  20. file_name db 'command.com', 0
  21. just_file db 'file', 0
  22. msg_ok db 'file opened$'
  23. msg_err db 'error$'
  24.  
  25. CSEG ends
  26. end start
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:20:14: warning: character constant too long for its type
 file_name db 'command.com', 0
              ^
prog.cpp:21:14: warning: multi-character character constant [-Wmultichar]
 just_file db 'file', 0
              ^
prog.cpp:22:14: warning: character constant too long for its type
 msg_ok    db 'file opened$'
              ^
prog.cpp:23:14: warning: character constant too long for its type
 msg_err   db 'error$'
              ^
prog.cpp:1:1: error: 'CSEG' does not name a type
 CSEG segment
 ^
stdout
Standard output is empty