MASM

Assembly Language New Line

风流意气都作罢 提交于 2019-12-19 11:31:59
问题 I'm brand new to assembly language programming, and I would like my output to have separate lines so that it is easier to read, however, I wrote my code and had it working, but was then informed that I could not in fact use the Irvine procedure to make a new line. My text book only uses the Irvine "Crlf" and the code from other people who asked similar questions on this website completely broke my program so now I'm lost. One I attempted was: mov ah, 0Eh ;print new line sequence mov al, 0Dh

Assembly Language New Line

一曲冷凌霜 提交于 2019-12-19 11:31:08
问题 I'm brand new to assembly language programming, and I would like my output to have separate lines so that it is easier to read, however, I wrote my code and had it working, but was then informed that I could not in fact use the Irvine procedure to make a new line. My text book only uses the Irvine "Crlf" and the code from other people who asked similar questions on this website completely broke my program so now I'm lost. One I attempted was: mov ah, 0Eh ;print new line sequence mov al, 0Dh

Visual Studio only breaks on second line of assembly?

南楼画角 提交于 2019-12-18 13:31:52
问题 The short description: Setting a breakpoint on the first line of my .CODE segment in an assembly program will not halt execution of the program. The question: What about Visual Studio's debugger would allow it to fail to create a breakpoint at the first line of a program written in assembly? Is this some oddity of the debugger, a case of breaking on a multi-byte instruction, or am I just doing something silly? The details: I have the following assembly program compiling and running in Visual

assembly fatal error LNK1190: invalid fixup found, type 0x0001

一曲冷凌霜 提交于 2019-12-18 09:29:33
问题 I want to write 16 bit 8086 assembly code in visual studio 2010 but gives me error: code: .MODEL small .STACK 100h .data message BYTE "Hello, world!","$" .code mov ah,9 mov dx,OFFSET message ; addr of buffer int 21h END output gives me this error: fm.obj : fatal error LNK1190: invalid fixup found, type 0x0001 I using masm32v11 . What should I do? 回答1: Where does the Assembler know where the starting address is? Using Microsoft (R) Segmented Executable Linker Version 5.60.339 Dec 5 1994 (16bit

Getting string input and displaying input with DOS interrupts MASM

寵の児 提交于 2019-12-18 06:55:45
问题 In MASM, I created a buffer variable to hold the user string input from keyboard. I am stuck on how to hold the string input into that buffer variable. I don't have any libraries linked like the irvine ones and want to do this with DOS interrupts. So far I have something along the lines of .model small .stack 100h .data buff db 25 dup(0), 10, 13 lbuff EQU ($ - buff) ; bytes in a string .code main: mov ax, @data mov ds, ax mov ah, 0Ah ; doesn't work mov buff, ah ; doesn't seem right int 21h

struct or class in assembly

懵懂的女人 提交于 2019-12-18 05:15:31
问题 I need something like struct or class in c++ For example I need a class with an array and two attribute (size and len) and some function like append and remove . How can I implement this in assembly with macros and procedures? 回答1: Tasm supports eg. struc String // note: without 't' at the end size dw 100 len dw 10 data db 0 dup(100) ends String Gnu assembler also has a .struct directive. The syntax for MASM is: String STRUCT size dw 100 len dw 10 String ENDS Usage again from the same MASM

__cdecl, __stdcall and __fastcall are all called the exact same way?

杀马特。学长 韩版系。学妹 提交于 2019-12-18 04:54:08
问题 I am using Visual C++ 2010, and MASM as my x64-Assembler. This is my C++ code: // include directive #include "stdafx.h" // functions extern "C" int Asm(); extern "C" int (convention) sum(int x, int y) { return x + y; } // main function int main() { // print asm printf("Asm returned %d.\n", Asm()); // get char, return _getch(); return EXIT_SUCCESS; } And my assembly code: ; external functions extern sum : proc ; code segment .code Asm proc ; create shadow space sub rsp, 20o ; setup parameters

Assembly programming - WinAsm vs Visual Studio 2017

点点圈 提交于 2019-12-18 02:58:16
问题 I'm here to ask you some stuff about VS2017. In the past I had used WinAsm for MASM and I never got problems with it. However, when I'm trying to do something with MASM in VS2017, I always gonna get problems and stuff... I've checked the whole internet about "how to set up VS for MASM", but nothing has helped me as I'm always getting troubles... Is there any way to use Visual Studio 2017 for MASM32/64bit without any kind of headache? Can someone give me the ultimate guide to set up VS2017 for

Assembly/Nasm - Segmentation fault (core dumped) error

杀马特。学长 韩版系。学妹 提交于 2019-12-17 20:33:14
问题 I'm very new to NASM and I'm trying to execute a MASM example online that I found, but has been a pain translating to NASM. It compiles and generates an output file correctly, but when I try to run it, it gives a Segmentation fault (core dumped error), which I have no idea what it is. OS is Ubuntu, trying to execute compiling under: nasm -f elf binario.asm ld -m elf_i386 binario.o io.o -o binario Here is the code: %include "io.mac" .DATA PROMPT_1 DB 0DH,0AH,'Enter the first binary number (

external assembly file in visual studio

守給你的承諾、 提交于 2019-12-17 17:38:45
问题 I searched and found I can not use __asm in x64 in visual studio. Instead I have to use an external assembly file. How can I add external assembly file to my win32 console project? How can compile them? Can you explain step by step. 回答1: How to build a mixed-source x64-project with a x64 assembly file in Visual Studio : 1) Start Visual Studio (Community) 2015 and choose FILE - New - Project . 2) In the next window choose Win 32 Console Application . 3) You get a confirmation. Click on Next >