Illegal command dosbox что делать
Перейти к содержимому

Illegal command dosbox что делать

  • автор:

DOSBox: debug.exe reads file — processes commands incorrectly

I’m trying to use DOSBox with debug.exe on a 64-bit system. It works perfectly fine if I enter the commands manually. When I redirect input from a file with:

debug < [file] 

enter image description here

it doesn't work. On every line except for the first it displays an error similar to this: DOSBox will eventually hang and crash. Is there any way to fix this? The input file I am trying to process as commands is:

a 100 jmp 145 db 'Hello, World!', 0D, 0A, 'Press any key to continue . . .$' a 145 mov ah, 09 mov dx, 102 int 21 mov ah, 08 int 21 int 20 rcx 100 n hello.com w q 

46.3k 8 8 gold badges 107 107 silver badges 200 200 bronze badges
asked Mar 26, 2016 at 1:20
FacelessTiger FacelessTiger
89 1 1 gold badge 1 1 silver badge 11 11 bronze badges

copying the text to a file and piping it into debug.com perfectly works for me, creating a hello.com which prints the message

Mar 26, 2016 at 9:26

4 Answers 4

I can reproduce the behavior you are seeing in this scenario:

  • DOSBox 0.74 on Windows and Linux
  • DEBUG.EXE from Windows XP copied to DOSBox
  • DEBUG.EXE from various versions of MS-DOS will cause problem including unexpected hangs. See this Stackoverflow question for another related problem.

I found a version of DEBUG.COM from FreeDOS that works as expected. I have made DEBUG.COM available for download from my website. Alternatively you can download the ZIP File from Softpedia and extract DEBUG.COM .

When I run DEBUG.COM I get this:

S:\>debug.com hello Hello, World! 

1 1 1 silver badge
answered Mar 26, 2016 at 14:43
Michael Petch Michael Petch
46.3k 8 8 gold badges 107 107 silver badges 200 200 bronze badges

Had same problem in DosBox 0.74 with DEBUG.EXE script redirection. Discovered that it could be fixed by changing the end-of-line characters in the script file from [CR][LF] to just [CR] when redirecting into DEBUG.EXE.

Pasting your file into the Scite editor and viewing the line-end characters showed this:

I used an option in Scite to change the EOL characters to [CR] alone, getting

saved the file, and was able to redirect it into DEBUG.EXE with no problem. Not sure why [CR][LF] causes the issue with DEBUG.EXE, but hope this helps.

DEBUG.COM handles either EOL sequence with no glitch, so makes sense to use it instead, especially with its extended features. But one can use DEBUG.EXE it seems, with this fix, FWIW. The Scite editor is a neat tool.

answered Aug 14, 2017 at 13:55
Guy Coutanche Guy Coutanche
21 1 1 bronze badge

I found the same problem running a script file for Debug within Dosbox. but I found another editor: Notepad2. runs great and small and changes color to highlight assembler words. Had to use debug ver 1.25 though.

answered Aug 25, 2017 at 2:12
11 1 1 bronze badge

Than you Michael Petch. I was trying everything to get the output of FreeDos clone of MS-DEBUG to save into a text file. But it was not the path, the speed, or the memory allotment that was blocking the redirection of output. It was indeed the line feed and cursor return combination. I quickly wrote a program to take out cursor return and leave line feed. It now redirects! I can also take out the line feed and leave the cursor returns, and DEBUG redirects to file as well. The small glitch is I have to access Windows outside the or close the DosBox window, for the outputted DEBUG code to become visible in a directory listing.

This is how I redirect DEBUG output to a file:

answered Apr 30, 2018 at 19:39
Benjamin Lindsey Weber Benjamin Lindsey Weber

  • assembly
  • dosbox
  • x86-16
    The Overflow Blog
Linked
Related
Hot Network Questions

Subscribe to RSS

Question feed

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.10.27.43697

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

DosBox и ошибка "Illegal command: masm"

Masm dosbox 0.74 win7 Error A2049
Добрый день, хотел слинковать программу, но появляется ошибка, хотел спросить с чем она связана .

Ошибка: При декодировании JSON возникла ошибка: Illegal Token
Добрый день. Сегодня решил обновить WordPress до версии 5.2, но перед этим сделал резервную копию.

Ошибка: Illegal instruction
Выдаёт ошибку Illegal instruction при запуске кода. В чем может быть проблема? .model small.

434 / 245 / 43
Регистрация: 05.08.2013
Сообщений: 1,670

забить на досбокс, поставить человеческую виртуалку и дос

Добавлено через 24 секунды
проблема больше по части виртуалок, а не ассемблера.

Добавлено через 12 секунд
читай маны

193 / 188 / 18
Регистрация: 06.10.2013
Сообщений: 357

ЦитатаСообщение от Мотороллер Посмотреть сообщение

проблема больше по части виртуалок, а не ассемблера.
Проблема в том, что в папке D:\masm32 нет исполнимого файла с названием masm.
Ушел с форума

Автор FAQ

16191 / 7525 / 1041
Регистрация: 11.11.2010
Сообщений: 13,526
tipahead,
вместо "masm" набери "ml"
6721 / 2697 / 375
Регистрация: 17.02.2013
Сообщений: 3,963

ЦитатаСообщение от tipahead Посмотреть сообщение

Далее переношу в DosBox hello.asm и мне пишет Illegal command: masm

Компьютер тебе сообщает что
- masm это не есть встроенная команда ОС, а значит он начал искать файл masm.exe или masm.bat или masm.com и найти такой файл он не может. Нету такого файла ни в текущем каталоге, ни в пути PATH

Ушел с форума

Автор FAQ

16191 / 7525 / 1041
Регистрация: 11.11.2010
Сообщений: 13,526

Ethereal,
masm.exe — старое название ml.exe, встречается в древних учебниках, например у Абеля в "Ассемблер и программирование для IBM PC"

Для того, чтобы выполнить исходную ассемблерную программу, необходимо прежде провести ее ассемблирование и затем компоновку. На дискете с ассемблерным пакетом имеются две версии aссемблера. ASM.EXE - сокращенная версия с отсутствием некоторых незначительных возможностей и MASM.EXE - полная версия. Если размеры памяти позволяют, то используйте версию MASM (подробности см. в соответствующем руководстве по ассемблеру)

у меня есть masm.exe — Macro Assembler Version 5.10, Macro Assembler Version 6.x и далее называются ml.exe

6721 / 2697 / 375
Регистрация: 17.02.2013
Сообщений: 3,963

Да знаю я. Просто если бы ТС понял что ему говорит компьютер, он сам бы во всем разобрался. Где masm.exe ? Нету masm-а. А что есть ? И т.д.

Регистрация: 30.08.2012
Сообщений: 151
На ml также реагирует - Illegal command
Ушел с форума

Автор FAQ

16191 / 7525 / 1041
Регистрация: 11.11.2010
Сообщений: 13,526
tipahead,
нажми на кнопку "Пуск""Поиск" и убедись, что ml.exe находится в папке d:\masm32\bin\
Регистрация: 30.08.2012
Сообщений: 151
Я еще тогда глядел, ml.exe в bin есть
6721 / 2697 / 375
Регистрация: 17.02.2013
Сообщений: 3,963

Ну так блин и блин. ОС найдет ml.exe и запустит только если он есть в текущем каталоге или в пути PATH. Очевидно ml.exe у тебя нет ни там ни там. Путь PATH ты можешь посмотреть командой
PATH
Сделай так . сначала добавь каталог D:\MASM32\BIN к пути PATH. Это делается так

set PATH=%PATH%;D:\MASM32\BIN

и потом запускай ml
Регистрация: 30.08.2012
Сообщений: 151
в cmd на ml реагирует, значит в path всё как нужно прописанно
6721 / 2697 / 375
Регистрация: 17.02.2013
Сообщений: 3,963

ЦитатаСообщение от tipahead Посмотреть сообщение

в cmd на ml реагирует, значит в path всё как нужно прописанно

ЦитатаСообщение от tipahead Посмотреть сообщение

На ml также реагирует - Illegal command
Ну и как тут одно с другим ?
Регистрация: 30.08.2012
Сообщений: 151
в cmd windows реагирует
в cmd эмулятора нет
434 / 245 / 43
Регистрация: 05.08.2013
Сообщений: 1,670
поставь человеческую досю на виртуалку
6721 / 2697 / 375
Регистрация: 17.02.2013
Сообщений: 3,963

Лучший ответ

Сообщение было отмечено tipahead как решение

Решение

ЦитатаСообщение от Мотороллер Посмотреть сообщение

поставь человеческую досю на виртуалку

И что в "человеческой досе" ml.exe пойдет ?

Добавлено через 4 минуты

ЦитатаСообщение от tipahead Посмотреть сообщение

в cmd windows реагирует
А чего тебе еще надо ?

ЦитатаСообщение от tipahead Посмотреть сообщение

в cmd эмулятора нет

Ну и нахрен он в данном случае нужен ? Эмулятор нужен чтобы запустить результат компиляции.
Но саму-то компиляцию нужно делать в виндах. Ибо masm32 только там и работает.

Добавлено через 6 минут
Если ты хочешь компилировать в эмуляторе, то тебе нужен древний MASM 3.0, который
только в MS-DOS работал. А ты взял виндозный MASM32. И чего ты ожидаешь ?
Что он в dosBox-е пойдет ? Никогда не пойдет. Он же только в виндах работает.
С помощью MASM32 компилировать надо в виндах. И только запускать в досбоксе.
А чтоб компилировать в досбоксе нужно взять древние досовские версии MASM/TASM.

Добавлено через 6 минут
Кстати да. Древний MASM 3.0 не поймет строчек
.MODEL Small
.STACK 100h
.DATA
.CODE
Зато TASM поймет. Под MS-DOS работали версии TASM 2.x и 3.x

DosBox 0.74 - "Illegal Command" Error When Mounting

I am running DosBox 0.74 on Linux Mint 18 and have an issue with trying to run certain built-in commands. When using the dosbox-0.74.conf file to mount images, folder, etc., it works fine. However, I am unable to mount anything from within the DosBox prompt itself. When trying to use the mount or imgmount commands, I get the error Illegal command: mount. . Even running help /all does not list these as available commands. I seem to remember being able to use mount all the time in the past (and indeed, many tutorials found online still say to issue the mount command from within DosBox). What am I missing?

asked Aug 22, 2017 at 3:10
277 1 1 gold badge 3 3 silver badges 9 9 bronze badges

Incidentally, I removed all my mount commands from the .conf file and I was able to issue mount commands within DosBox again. Does DOSBox only allow mounting in one place or the other?

Aug 22, 2017 at 3:15

What EXACTLY is the mount command you're trying to use, and what EXACTLY is the error you get. I set my path to null: "Z:\>path=", and ask dosbox what my path is: "Z:\>path" --> "PATH=(null)", and dosbox can still find the "mount" command. But if you unset Z, and switch to a different drive/directory, you'll get that exact error. At the dosbox prompt, enter "path=z:\". Then check if you can use mount.

Aug 15, 2018 at 2:52

I’m voting to close this question because it's about general computing, not gaming (I don't think DOSBox counts as gaming-specific software)

Jul 30, 2022 at 0:28

We do have a 'dosbox' tag, and its description reads that it is "primarily intended for playing older games".

Jul 30, 2022 at 9:21

A bit unsure of this one. While dosbox's own website say it's primarily for games, I know you can do more with it. I've personally compiled the C code for Wolfenstein 3D using it and played it. I guess you can say that's somewhat gaming related too though? 🙂

VOGONS

Greetings all.
I am attempting to install an old Gamehouse game in dosbox on my Samsung 2019 Tab A tablet.
The game is called Wordslinger, and i have been playing it since early 2oo6.
I downloaded the dosbox turbo and dosbox manager app from the Google Play store and have installed both
on the tablet.
I have copied the WordSlinger folder from my win8.1 pc on which it is running without any problems.
I have run dosbox manager and made a profile for the game and that .conf file is in the same location on the tablet
as WordSlinger Both are in the Downloads folder.
When i start dosbox from the manager, my tablet loads the Welcome screen in dosbox followed by the following:

DosBox Turbo for Android
Drive C is mounted as local directory /storage/emulated/0/Download/
Directory name is longer than 8 characters and/or contains spaces.
try cd WordSl~1
Illegal command: WordSlinger.exe
c:\>

Okay - realised the 8 character was an error.

Redid the conf. file and this is now what I get:

DosBox Turbo for Android
Drive C is mounted as local directory /storage/emulated/0/Download/
Illegal command: WordSlinger.exe
C:\WORDSL~1>

My autoexec.bat file is as follows:

Filename Autoexec.txt File size 331 Bytes Downloads 34 downloads File license Fair use/fair dealing exception

Hoping someone may be able to offer some advice.
Thanks in advance

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *