dosbox | Modification of dosbox with VNC support | Game Engine library
kandi X-RAY | dosbox Summary
kandi X-RAY | dosbox Summary
dosbox v0.74 manual (always use the latest version from www.dosbox.com). while we are hoping that one day dosbox will run all programs ever made for the pc, we are not there yet. at present, dosbox running on a high-end machine will roughly be the equivalent of a pentium i pc. dosbox can be configured to run a wide range of dos games, from cga/tandy/pcjr classics up to games from the quake era. type intro in dosbox for a quick tour. it is essential that you get familiar with the idea of mounting, dosbox does not automatically make any drive (or a part of it) accessible to the emulation. see the faq entry "how to start?" as well as the description of the mount command (section 4: "internal programs"). if you have your game on a cdrom you may try this guide: start: how to start? automation: do i always have to type these "mount" commands? fullscreen: how do i change to fullscreen? cd-rom: my cd-rom doesn’t work. cd-rom: the game/application can’t find its cd-rom. mouse: the mouse doesn’t work. sound: there is no sound. sound: what sound hardware does dosbox presently emulate? sound: the sound stutters or sounds stretched/weird. keyboard: i can’t type \ or : in
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dosbox
dosbox Key Features
dosbox Examples and Code Snippets
Community Discussions
Trending Discussions on dosbox
QUESTION
I have recently started back up on my project and am getting an error when I compile my nasm program. I am using nasm 2.15.05 and am compiling in DOSBox, I have also tried FreeDOS in VirtualBox but I suspect it has nothing to do with the environment. The error that is produced is:
non-constant argument supplied to TIMES.
I am not using times
in the source file which threw me but I looked at the listing and it's the istruc
macro. Here is the relevant block from the listing file:
ANSWER
Answered 2022-Mar-14 at 18:17This error is caused by defining the struc
structure after its use by the istruc
macro.
First, look at this test to see how it works correctly when using your example, with the struc
occurring in the source before its use by istruc
:
QUESTION
I'm stuck with my .bat that doesn't execute correctly if any mistakes please report it
File name - games.bat
...ANSWER
Answered 2022-Mar-09 at 09:50The choice command is available for dosbox and probably the only way to achieve what you want:
QUESTION
I have just started learning assembly language programming in x86
mainly using DOSBox
. I was using DOSBox in a Linux virtual machine. Recently, I found an extension in vscode MASM/TASM
:
So, I liked it and started using it since I could now write assembly language programs in vscode itself. But, the problem is it won't let me create another .asm
file. Instead, it will just keep the single file I had created earlier. This file would always be there in the directory.
This is the one file (which I had created):
And this is the file (and many others) which I want to add to the directory as well and use:
I have tried using masm prac.asm
, but it gives a does not exist
error. The only thing that works is copy test.asm prac.asm
which addes prac.asm
to the directory. On closing the dosbox emulator, the file prac.asm
gets erased from the directory. Is there any way to always have multiple files in the directory like prac.asm
, prac2.asm
etc.?
ANSWER
Answered 2022-Feb-28 at 20:11In the settings for this extension there's one called Working mode
. By default it's set to single file. If you change to workspace it will mount the whole dir.
QUESTION
I have been given an assignment to make a 2 pass assembler for 8086
. I wish to keep things simple and only assemble small programs for now. I found that the .COM
format is very simple. However I cannot find the specifics of the file format.
Also I read that execution always begins at 100h
. So won't it be a problem if MS-DOS
(actually DOSBOX
in my case) has system programs already present there? And Do I need to provide some default stub code in the 0h
-100h
part?
I simply want to know how will I write a .COM
file that is runnable on DOSBOX
.
ANSWER
Answered 2021-Dec-23 at 05:25The .COM
format has no structure, it's a flat binary.
The program (the whole file) is loaded to address 100h
in some segment. Below that, you'll find the PSP for your program. The last usable word in the segment (usually at offset fffeh
) will be overwritten with 0000h
and the stack pointer pointed to it. This allows you to exit the program with a ret
instruction.
DOS's program-loader sets all of CS
, DS
, ES
, and SS
to the segment of your program. Then, the DOS kernel jumps to address 0100h
(i.e. the start of your program) to run it. (Technically, the program loader doesn't set cs
until it does a far jmp
or iret
to the cs:100h
; if it had set CS
earlier, any IP
value would be inside the new program's memory, not the DOS kernel.)
That's really all there is to it. Your program doesn't have to care about segmentation at all, as long as the flat 64K of the "tiny" memory model is sufficient for all your static code+data loaded from the file, stack at the top, and any memory in between as BSS or "heap". Any segment base works the same, so for example [bx]
and [bp]
address the same linear address even though bp
implies ss:
and bx
implies ds:
.
Note that because the DOS kernel picks a segment for your program, it won't collide with any already loaded programs or the DOS kernel. It'll just work as expected.
As for writing COM programs, I recommend using an assembler like NASM with output format “binary” (i.e. no output format). The general template is this:
QUESTION
I'm using turbo c++ which launches DOSBox 0.74
I have the following program:
...ANSWER
Answered 2021-Dec-01 at 20:12The window()
function from conio.h
only defines an active window on the text screen. The default screen will be the 80x25 text screen. The coordinates that you specified in window(100, 100, 200, 200);
are offscreen, so no window got created.
Try this:
QUESTION
this code is for snake game. the proc detect _ direction calls mov_snake proc that does many things and ends up with calling detect_direction . when I run the code in DosBox (the most updated version) the snake location is being updated twice and the the code stoprun (not via the endgame proc, the line c:tasm/bin/ shows up again)
If you have any idea please comment it.
...ANSWER
Answered 2021-Nov-20 at 14:44Your code has much improved since your previous question, but because of the many errors that are still in there, I doubt it if someone could fully answer your "WHY???"
I will focus on one of your procedures, boundries, where you want to end the game if the snake collides with the top- or bottom rows or left- or right columns
The first test, cmp di,160
ja keep_playing
, means that you keep playing provided the snake does not touch the top row of the screen. None of the other borders is even verified!
What you need if inverting the conditional jump like in cmp di, 160
jb stop_playing
.
In the fourth test (for the right side border) you divide an odd number (because of the inc ax
) by 160. This will always yield a non-zero remainder. So, not a useful test. To test for left- and right borders, you can do with just one division and interpret the remainder twice: 0 is a left side collision and 158 is a right side collision.
QUESTION
I am quite new to assembly and recently I have been struggling to make INT 21,43 (changing file attribute to read-only) work. I am using Windows 10, DOSBox x86, and Turbo Assembler/Linker/Debugger if that makes any difference. As far as I can tell using the debugger, it should work (CF is NOT set and I am not getting error code as I should, according to documentation). Also, if I use the same INT 21,43 to GET (setting al to 0) file attribute of a file, that was already set to read-only manually, CX is set to 20, which as far as I know does not make sense, but CF is not set as well, so it says it worked. I hope you can help me fix it, thanks in advance.
...ANSWER
Answered 2021-Oct-30 at 21:08I just tried setting the ReadOnly attribute from a program running in DOSBox and it didn't work.
DOSBox's help via help /all
, reports that the ATTRIB
command does nothing and that it's provided for compatibility only. Therefore it stands to reason that the DOS.function 43h (Get/Set File Attributes) will not have been implemented.
Since DOSBox is primarily meant to emulate old DOS games, there's perhaps little reason to want to change attributes.
QUESTION
I'm kinda new to assembly and I want to know how to get a char ASCII code and print out that ASCII code. I'm using MASM (Dosbox).
...ANSWER
Answered 2021-Oct-18 at 22:06From comments
MOV AX, 'A'
MOV BX, 10
DIV BL
MOV AH, 2
INT 21h
This byte-sized division will leave a quotient in AL
and a remainder in AH
.
But the DOS.PrintCharacter function 02h expects its input in the DL
register.
After DIV:
ADD AH, 48
ADD AL, 48
Fine to convert, but you can do it in one go with ADD AX, 3030h
I got this output: ##
Try next code:
QUESTION
It is my first time writing in Assembly, so the code might not be perfect (or even good), but it is how I worked it out, don't judge too much :) . It is written for Intel x86 using DOSbox and Turbo Assembler/Linker/Debugger if that makes any difference. The task is to get a line from the user and convert all uppercase into lowercase (leaving everything else as is). The problem is that when I print each symbol one by one and add '\n'(new line) after it, it works fine, however, I need my output to be in a single line, so when I try to print without '\n', it skips the very first symbol. Why it does that, how to fix it, and why it works with '\n'?
...ANSWER
Answered 2021-Sep-19 at 22:17QUESTION
I have been developing a simple RTS game using C++ in Linux. By the DJGPP, I can also cross-compile the game to DOS build. In Linux, once the game starts, it only uses about 25MB of RAM though many game objects such as game units are created. But when it runs in DOSbox, it is very slow at the beginning and getting slower while the number of created game units is increased. Of course, DOS is old, but I think 25 MB is enough to run the game there.
Could you let me know what's wrong with me?
So my questions are following;
- The game uses about 25MB of RAM in Linux, so does it have to use such an amount in DOS, too?
- Is there a boundary value that limits the usage of RAM in DOS?
ANSWER
Answered 2021-Sep-14 at 03:00
- The game uses about 25MB of RAM in Linux, so does it have to use such an amount in DOS, too?
Linux executables are 32 or 64-bit whereas DOS is a 16-bit OS so many objects will be smaller in DOS. However many 32/64-bit operations in DOS would be longer in DOS due to obvious reasons, which means they'll require larger code space to accommodate. Depending on the code the memory usage in DOS may be smaller or larger
- Is there a boundary value that limits the usage of RAM in DOS?
DOS (hence also FreeDOS) doesn't manage memory like that. Only a single process (excluding TSRs) runs at a single time so they own the whole memory space and manage that themselves. There's no need for process protection, a process can access everything
Besides DOS can't support more than 1MB RAM of memory. You have only 640KB of userspace RAM and that's the limit you get
You can access more memory with EMS, XMS but they don't belong to DOS and you'll have to explicitly load those libraries and call the appropriate APIs
For more information read DOS memory management
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dosbox
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page