dos

assembly concatenate two strings

感情迁移 提交于 2021-01-29 04:02:04
问题 I want to concatenate two strings but in my output instead of getting the final concatenated string, I get a line of weird characters and spaces, maybe someone could help me a bit. I want to save the result in s3. Here is the code DATA SEGMENT STR1 DB "ENTER FIRST STRING HERE ->$" STR2 DB "ENTER SECOND STRING HERE ->$" STR3 DB "CONCATEnatedD STRING :->$" STR11 DB "FIRST STRING : ->$" STR22 DB "SECOND STRING: ->$" s1 DB 20 DUP("$") s2 DB 20 DUP("$") s3 db 40 dup(?) NEWLINE DB 10,13,"$" DATA

turn on echo temporarily

六眼飞鱼酱① 提交于 2021-01-28 03:03:45
问题 I am creating a batch file and have turned echo off with @ECHO OFF however I need to demonstrate one of the commands in the batch onscreen how would I temporarily turn on ECHO 回答1: Syntax: ECHO [ON | OFF] ECHO [Message] A simple ECHO ON should solve this mystery. 来源: https://stackoverflow.com/questions/10036250/turn-on-echo-temporarily

Compile and Link to .com file with Turbo C

倾然丶 夕夏残阳落幕 提交于 2021-01-27 06:32:06
问题 I'm trying to compile and link a simple program to a DOS .com file using Turbo C compiler and linker. By that I try the simplest C-program I can think of. void main() {} Are there command line arguments to link to com files in the Turbo C Linker? The Error Message I get from the Linker is the following: "Fatal: Cannot generate COM file: invalid entry point address" I know that com files need entry point to be at 100h. Does Turbo C have an option to set this address? 回答1: It has been a long

Compile and Link to .com file with Turbo C

倾然丶 夕夏残阳落幕 提交于 2021-01-27 06:31:37
问题 I'm trying to compile and link a simple program to a DOS .com file using Turbo C compiler and linker. By that I try the simplest C-program I can think of. void main() {} Are there command line arguments to link to com files in the Turbo C Linker? The Error Message I get from the Linker is the following: "Fatal: Cannot generate COM file: invalid entry point address" I know that com files need entry point to be at 100h. Does Turbo C have an option to set this address? 回答1: It has been a long

Having no luck with data NASM

北战南征 提交于 2021-01-20 12:19:50
问题 section .data map db 1 section .text start: cmp byte [map], 1 je exit jmp start exit: ret I'm having no luck reading data. What I mean is that I assemble to the binary dos COM format and when I start it it just freezes. Can someone tell me what i'm doing wrong? 回答1: DOS com files are expected to be loaded at address 0x100. You should include line org 0x100 at the start of your code. 来源: https://stackoverflow.com/questions/26424041/having-no-luck-with-data-nasm

Use of Turbo Assembler

吃可爱长大的小学妹 提交于 2020-12-30 03:38:31
问题 I use an IBM processor, and I have barely begun to delve into x86 assembly. Now that I have thoroughly read through an assembly book, I decided to put a simple program to the test (one that prints an exclamation mark on the screen): .MODEL SMALL .CODE MOV AH,2h MOV DL,21h INT 21h INT 20h END Now, there was a similar example in the book titled Peter Norton's Assembly Language Book for the IBM PC that went along these lines: .MODEL SMALL .CODE MOV AH,2h MOV DL,2Ah INT 21h INT 20h END I assume

Use of Turbo Assembler

坚强是说给别人听的谎言 提交于 2020-12-30 03:37:42
问题 I use an IBM processor, and I have barely begun to delve into x86 assembly. Now that I have thoroughly read through an assembly book, I decided to put a simple program to the test (one that prints an exclamation mark on the screen): .MODEL SMALL .CODE MOV AH,2h MOV DL,21h INT 21h INT 20h END Now, there was a similar example in the book titled Peter Norton's Assembly Language Book for the IBM PC that went along these lines: .MODEL SMALL .CODE MOV AH,2h MOV DL,2Ah INT 21h INT 20h END I assume

MASM: How to resolve Immediate mode Illegal in 8086 programming?

|▌冷眼眸甩不掉的悲伤 提交于 2020-11-29 10:00:47
问题 I am solving a fundamental question of Assembly Language Programming to add BCD numbers and two ASCII numbers, for that I got that I have to use DAA and AAA instructions respectively, Now I am trying to store the result stored in AX register into my desirable memory location, but not getting that why the following code is giving me error Immediate mode Illegal Below is the code that I have coded till now, please help me that how to eradicate this error PS: I want to move my result into my