dosbox

How to make timer works? Call int 4ah 5 seconds after start

自闭症网瘾萝莉.ら 提交于 2019-12-11 04:49:57
问题 I'm creating a program, that should print "Hello from handler" five seconds after start. At first I created interrupt 4ah by proc called create_interrupt . This interrupt causes int_handler , that prints string "Hello from handler". Then proc "alarm" get curent time, add 5 second to it and set alarm by func 06h of int 1ah. This alarm should call int 4ah after 5 seconds from start, but it doesn't works and I don't know why. If I call 4ah "by hand", just by adding "int 4ah" it works, it means

How to assemble 16-bit asm code using NASM, then debug it in Linux, before making an executable in DOSBox

孤街醉人 提交于 2019-12-10 18:42:46
问题 We've been asked to write 16-bit assembly code and assemble it to run in DOSBox. I know that 16-bit assembly code just differs from normal x86 assembly code in that it uses bits 16 and also 16-bit registers ( ax , bx , cx , ...). I tried searching on how to use NASM for 16-bit code and unfortunately didn't understand what it's saying. What I just want to know is what parameters to use in NASM to assemble 16-bit assembly code? ( -bin or -obj ?), and then if possible, how to debug it in Linux.

Convert Character to binary assembly language

半腔热情 提交于 2019-12-08 12:21:12
问题 Hi i m using dosbox and masm compilor. I want to prompts the user to enter a character, and prints the ASCII code of the character in hex and in binary on the next line. Repeat this process untill the user types a carriage return. The following code work fine to display the charcters in hexadecimal until a carriage return how can i modify this code to display the binary of charcter as well.? .MODEL SMALL .STACK 100H .DATA PROMPT_1 DB 0DH,0AH,'Enter the character : $' PROMPT_2 DB 0DH,0AH,'The

How to run a MS-DOS .asm file using VS2013 or MASM32?

北城余情 提交于 2019-12-08 09:18:05
问题 Here is my test.asm code. Basically 'nothing' inside because just want to get it to build and run without errors first. .model small .stack 64 .data .code main proc mov ax,@data mov ds,ax mov ax,4c00h int 21h main endp end main I have tried using visual studio 2013 include the lib, add the linkers and all those guides from websites but no luck. Always getting this error message "error A2006: undefined symbol : DGROUP" for both MASM32 and visual studio 2013. Please guide me step by step on the

Change the background color of dosbox console when executing a tasm program

眉间皱痕 提交于 2019-12-07 11:03:57
问题 I am trying to display x in the center of the screen and then change the background color of the console to blue. I have the following code that accomplishes everything except for changing the background color: TITLE screen1.ASM .MODEL SMALL .STACK 0100h .DATA .CODE start: MOV AX,@DATA MOV DS,AX MOV AX,0600h MOV BH,07h MOV CX,0000h MOV DX,184Fh INT 10h MOV AH,02h MOV BH,00h MOV DH,0Ch MOV DL,28h INT 10h MOV AH,02h MOV DL,'x' INT 21h MOV AX,4C00h INT 21h END start The code clears the screen,

DosBox how to fix character attribute?

纵饮孤独 提交于 2019-12-06 09:42:55
I wrote my assembly code just to write a character with a blue background and white foreground. It works in emu8086's emulator but when I open it on DosBox it does not show the background color. With Emu8086: With DosBox: mov ax,0012h int 10h mov ah,9 mov al,31h mov bl,1fh int 10h In the graphics video modes, the BL parameter for BIOS function 09h only defines the foreground color. It is always applied to a black background. Below is my implementation of an extension of the functionality of this function. Now BL holds an attribute (foreground color and background color) just like in the text

Change the background color of dosbox console when executing a tasm program

纵饮孤独 提交于 2019-12-05 15:36:46
I am trying to display x in the center of the screen and then change the background color of the console to blue. I have the following code that accomplishes everything except for changing the background color: TITLE screen1.ASM .MODEL SMALL .STACK 0100h .DATA .CODE start: MOV AX,@DATA MOV DS,AX MOV AX,0600h MOV BH,07h MOV CX,0000h MOV DX,184Fh INT 10h MOV AH,02h MOV BH,00h MOV DH,0Ch MOV DL,28h INT 10h MOV AH,02h MOV DL,'x' INT 21h MOV AX,4C00h INT 21h END start The code clears the screen, displays x at the center of the dosbox window and gives control back to DOS. I'm trying to find out what

Vectors header file in DosBox

浪子不回头ぞ 提交于 2019-12-04 03:38:51
问题 I am using DosBox 0.74 and I want to use vectors function, but I can't locate its header file ? its not <vector.h> nor <vector> . I tried it with Visual Studio and it was working fine. It has a different name in DosBox or what ? Please help me, since I have to submit my work with DOSBox. 回答1: Vectors were implemented in C++ after Turbo C++. In fact, C++ (as the standardised language we know it today) didn't exist until after Turbo C++! It is a truly ancient IDE and anyone would recommend not

汇编 之 win10 下安装dosbox 和 MASM

匿名 (未验证) 提交于 2019-12-03 00:14:01
所需工具链接: 链接:https://pan.baidu.com/s/1nenMsSdgEkeRKc6wh9DQRA 提取码:1r89 只需要以下两个工具 安装dosbox 和MASM步骤 (1)解压并打开如下文件 (2)双击dosbox安装程序 (3)常规安装 (4)找MASM文件夹,复制并单独放在一个文件夹,我是单独放在d盘的;我的masm路径 D:\masm (5)配置dosbox 打开DOSBOX的安装根目录(默认安装路径:C:\Program Files\DOSBox-0.74;若是64位的系统,则默认安装路径:C:\Program Files (x86)\DOSBox-0.74),双击文件DOSBox 0.74 Options.bat,运行该批处理文件后系统会用文本文档Notepad打开配置文件dosbox-0.74.conf。将光标定位到dosbox-0.74.conf文件的[autoexec]节点(一般在该文件末尾),在文件中添加以下内容: MOUNT C D : \MASM # 将目录D:\DEBUG挂载为DOSBOX下的C: set PATH = $PATH$ ; D : \MASM # 将D:\DEBUG写入环境变量PATH中 样例程序: (1)双击dosbox (2)使用小的那个窗口 可以输入 EDIT 1.ASM 进行编写代码(不建议这么使用

DOSBox闪退问题

匿名 (未验证) 提交于 2019-12-03 00:09:02
最近学习王爽的《汇编语言》,里面提到了用debug操作寄存器,但是64位系统没有debug命令了,解决办法是下载DOSBox,这个网上有很多教程。 DOSBox 0.74.exe 自己试了好几次之后终于发现了门道,解决办法很神奇,哈哈。就是在上面那个界面还没有闪退时点一下后面那个大的窗口,让大窗口在前面,像下面这样。后面大窗口把小窗口覆盖了,所以看不到小窗口了。 点了之后,这样过一会,就启动成功了,出现如下界面。 debug 来源:博客园 作者: 晴天的枫 链接:https://www.cnblogs.com/zzjBlog/p/11559629.html