logo
down
shadow

ASSEMBLY QUESTIONS

Assembly - trying to write to file but access denied
Assembly - trying to write to file but access denied
wish of those help I have a file which I need to write to from a "Buffer" in Data Segment, but when I try to write to the file with the DOS interrupt 21h 40h, it sets the Carry flag to 1, and the ax to 05 - which means access denied, what to do , Whe
TAG : assembly
Date : January 12 2021, 09:11 PM , By : KS9
Why do I get triple fault when trying to handle an exception on 286 but not on a modern CPU nor Bochs?
Why do I get triple fault when trying to handle an exception on 286 but not on a modern CPU nor Bochs?
it helps some times I'm trying to initialize protected mode with exception handling on an AMD 286 system. I've debugged the code below on Bochs, and it works fine there. So does it when run on a Pentium 4 machine. But on the 286 it simply triple faul
TAG : assembly
Date : January 11 2021, 05:14 PM , By : SilverRuby
MIPS assembly: big and little endian confusion
MIPS assembly: big and little endian confusion
hop of those help? It would be the same -- the order of the bytes in memory would be different, but you would only see that if you loaded single bytes from 200($t1), 201($t1), 202($t1) and 203($t1)
TAG : assembly
Date : January 10 2021, 01:47 PM , By : user158220
Messing with the stack in assembly and c++
Messing with the stack in assembly and c++
I hope this helps you . The following code excerpts have been checked with mingw-g++, but should work in VC++ with minor modifications. The full sources are available from Launchpad: 1The only way we can safely save call-specific data is to store it
TAG : assembly
Date : January 10 2021, 01:47 PM , By : msugar
Reading a string in TASM x86 assembly
Reading a string in TASM x86 assembly
like below fixes the issue The DB (define byte) directive is used to allocate byte-sized blocks of memory. The section that comes after the DB specifies the value that should be placed into the allocated memory. For example, if you wanted to define a
TAG : assembly
Date : January 10 2021, 01:45 PM , By : boney M
Is CMOVcc considered a branching instruction?
Is CMOVcc considered a branching instruction?
Hope that helps No, it's not a branch, that's the whole point of cmovcc.It's an ALU select that has a data dependency on both inputs, not a control dependency. (With a memory source, it unconditionally loads the memory source, unlike ARM predicated l
TAG : assembly
Date : January 09 2021, 02:14 PM , By : user184406
Why mov ax, [[num] + val] isn't the same as breaking it to instructions
Why mov ax, [[num] + val] isn't the same as breaking it to instructions
will help you Because assembler is different to most of the other programming languages.Most of the PLs are aiming for generalization and universal usage of their syntax, as building blocks, to compose expressions way beyond trivial syntax of particu
TAG : assembly
Date : January 09 2021, 05:38 AM , By : ranja
.set label, . Vs. label: GNU AS
.set label, . Vs. label: GNU AS
wish of those help Very interesting question. I've never seen anyone do this before. In short, yes, they are a little different. Here are a couple cases:Local labels
TAG : assembly
Date : January 02 2021, 06:48 AM , By : browe
String printer doesn't print newlines
String printer doesn't print newlines
it should still fix some issue As mentioned in the comments, you should zero-terminate the newLine message.
TAG : assembly
Date : January 02 2021, 06:48 AM , By : arbeitandy
Why do I get another result?
Why do I get another result?
will help you The .start directive will produce code that will initialize the segments for the model you have chosen (in this case small). You overwrite DS with whatever happens to be in AX with mov ds, ax. That will point the data segment to a place
TAG : assembly
Date : January 02 2021, 06:48 AM , By : user184406
I want to convert x86 Linux shellcode with system calls to ARM Linux system calls
I want to convert x86 Linux shellcode with system calls to ARM Linux system calls
hop of those help? I want to convert Intel x86 assembly code to ARM. I do not know how to use the stack. , man syscall
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Kocur
Finding first and last capital letter in user input
Finding first and last capital letter in user input
will help you Input is to be taken from a-z or A-Z and the input is ended by an asterisk *. , First ask yourself these questions: What are capitals?
TAG : assembly
Date : January 02 2021, 06:48 AM , By : dormsbee
Which 2 cases aren't solved with this code?
Which 2 cases aren't solved with this code?
hope this fix your issue In the example that is written with the Hebrew version,my teacher wrote that the sequence appears twice.
TAG : assembly
Date : January 02 2021, 06:48 AM , By : dexteryy
8086 assembly register indirect MOV instruction
8086 assembly register indirect MOV instruction
I hope this helps you . In the current Intel® 64 and IA-32 Architectures Software Developer Manual this is described on page 509 of 4898:In 16-bit Intel assembly it is impossible to use the AX register for register indirect addressing.
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Thierry Brunet
Where is the time stamp located in a file? Want to change it using assembly
Where is the time stamp located in a file? Want to change it using assembly
it should still fix some issue Twenty years ago, when I was taking an assembly course, the professor gave a handout in which there was instruction of where the time stamp of a file was. With that information, I was able to change time stamp of files.
TAG : assembly
Date : January 02 2021, 06:48 AM , By : jonagh
How to make audio driver for MS-DOS?
How to make audio driver for MS-DOS?
To fix this issue This is a bit difficult to achieve. The Tandy sound card works by writing data to port 0xc0. In order to emulate the sound card, you need to intercept writes to that port and handle them with your software. This is impossible on the
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Marc
Do two consecutive labels form two different basic block or are they the same in assembly
Do two consecutive labels form two different basic block or are they the same in assembly
should help you out Any label that's a branch target can be considered the start of a basic block.It doesn't really matter whether you look at it as falling through an empty basic block before getting to the "real" one, or whether you decide that bot
TAG : assembly
Date : January 02 2021, 06:48 AM , By : ThF
How would i make this a decryption instead of an encryption?
How would i make this a decryption instead of an encryption?
should help you out If this is a homework assignment, then it's actually quite a tricky one. (Though I may have overlooked a simple approach.)Let's focus on the effect this code has on memory. For simplicity I will assume you are not interested in th
TAG : assembly
Date : January 02 2021, 06:48 AM , By : ravibits
Floating-point addition assembly algorithm
Floating-point addition assembly algorithm
Hope this helps You do not have to care about the sign of operands if you turn them to two's complement.
TAG : assembly
Date : January 02 2021, 06:48 AM , By : delphiace
How do we track values of different registers while coding a large program
How do we track values of different registers while coding a large program
it should still fix some issue To answer the title question: yes, use comments to describe which logical "variable" is going to be in which register for a block of code. And document inputs/outputs/clobbers for each function. Like ;;; input: ds:si po
TAG : assembly
Date : January 02 2021, 06:48 AM , By : toki
Different Segments may collapse with each other
Different Segments may collapse with each other
will be helpful for those in need Setting the segment registers won't change the content of the memory (in fact in real mode memory is not accessed at all), it will only change the CPU's view of memory (the logical to linear translation). Having two
TAG : assembly
Date : January 02 2021, 06:48 AM , By : kbrust
Assigning value to the variable present in previous line using $ sign
Assigning value to the variable present in previous line using $ sign
it fixes the issue It appears that the developers were intent on using the I_AM macro to make symbols (that point at BYTEs, WORDs, and DWORDs) publicly accessible by other modules. The problem is that the I_AM macro doesn't allow you to specify the d
TAG : assembly
Date : January 02 2021, 06:48 AM , By : phil
How to read hardware input using emu8086
How to read hardware input using emu8086
To fix the issue you can do EMU8086 doesn't have any support for pass-through access to real hardware for guest code running inside the emulated 8086 PC.From what I've read, it doesn't even fully emulate PC hardware for that virtual guest machine (e.
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Mike
How does LLVM handle the x86 flag register?
How does LLVM handle the x86 flag register?
it helps some times x86 flag status register is pretty target-specific and certainly should not be modeled in LLVM IR – it is too low-level. The same concepts could be modeled otherwise in target-neutral manner via llvm.uadd.with.overflow, etc.Also,
TAG : assembly
Date : January 02 2021, 06:48 AM , By : rhyhann
Sum of two numbers (each 2 characters) in assembly 8086
Sum of two numbers (each 2 characters) in assembly 8086
it helps some times Your AffichageMesRes procedure is wrong. First, it calls Somme again, in spite both numbers have already been added in the main thread debut:. Second, using the DOS function AH=2 WRITE CHARACTER TO STANDARD OUTPUT expects the char
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Matt Croydon
How to alloc a segment of memory using BIOS service?
How to alloc a segment of memory using BIOS service?
it should still fix some issue I am tryng to alloc a free segment of memory using INT 12h BIOS service but I couldn't. How alloc free memory segments using INT 12h? , INT 12h
TAG : assembly
Date : January 02 2021, 06:48 AM , By : John Studdert
segmentation fault while trying to run graphics in yasm
segmentation fault while trying to run graphics in yasm
Does that help That's not x86-64 assembly but 16-bit assembly code. If you run this in a 64-bit OS I would expect a segmentation fault.This code needs to be run in real mode, probably in DOS. Today this probably means to run this code in DOSBOX or a
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Star Gryphon
Register content after execution
Register content after execution
wish of those help If you don't know what a specific assembler instruction does, always refer to the AVR Instruction Set Manual where all instructions are documented in detail.The brne instruction is a conditional branch ("BRanch if Not Equal").
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Mossy Breen
Explain how the flags work in conditional jumps in Assembly language
Explain how the flags work in conditional jumps in Assembly language
it fixes the issue The general idea is: there are some operations that set or clear individual flags - arithmetic, bitwise, comparisons. You are then free to perform conditional jumps based on the result of those operations.Let's consider the most ba
TAG : assembly
Date : January 02 2021, 06:48 AM , By : scotta01
What does a program (the assembly) that uses a GPU even look like?
What does a program (the assembly) that uses a GPU even look like?
To fix the issue you can do What does code that uses a GPU even look like? Read much more about OpenCL (or, for Nvidia hardware only, about CUDA). Be also aware of OpenACC ! See also OpenCL related resources, and read some OpenCL book. Read some Open
TAG : assembly
Date : January 02 2021, 06:48 AM , By : user134570
Dword conversion to dec in little endian
Dword conversion to dec in little endian
may help you . I'd like to give you an alternative explanation to Kasper's answer:In the decimal system you can "store" values from 0 to 9 in each digit. To store larger numbers, you use multiple digits. The value of a number written as "1234" is cal
TAG : assembly
Date : January 02 2021, 06:48 AM , By : jim
Is there a way to subtract packed unsigned doublewords, saturated, on x86, using MMX/SSE?
Is there a way to subtract packed unsigned doublewords, saturated, on x86, using MMX/SSE?
To fix the issue you can do If you have SSE4.1 available, I don't think you can get better than using the pmaxud+psubd approach suggested by @harold. With AVX2, you can of course also use the corresponding 256bit variants.
TAG : assembly
Date : January 02 2021, 06:48 AM , By : scotta01
How to make timer works? Call int 4ah 5 seconds after start
How to make timer works? Call int 4ah 5 seconds after start
Any of those help DOSBox does not give access to the Real Time Clock. Functions like int 1Ah AH=06h (BIOS.SetSystemAlarm) and int 21h AH=2Dh (DOS.SetSystemTime) don't operate correctly!
TAG : assembly
Date : January 02 2021, 06:48 AM , By : demize95
How to calculate the sum of a sequence of powers of 2 in x86?
How to calculate the sum of a sequence of powers of 2 in x86?
wish help you to fix your issue Base 2 is an extremely special case because computers use binary integers.2^n = 1
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Gabriel
MIPS little or big endian when encoding as hex
MIPS little or big endian when encoding as hex
Any of those help In MIPS1, are hex values stored as little or big endian, for example add t1 t2 t3. Would this be stored as 00000001010010110100100000100000 0x014B4820 or 00000100000100101101001010000000 412D280 , ... or 0000010000010010110100101000
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Marcos de Carvalho
Get C string length of a 16 or 32-byte fixed-size buffer? (XMM or YMM register width)
Get C string length of a 16 or 32-byte fixed-size buffer? (XMM or YMM register width)
help you fix your problem This is exactly how you implement strlen or memchr with AVX2. (For a fixed-size buffer where you know there will be a match somewhere in the buffer.)(Except now you have a redundant and).
TAG : assembly
Date : January 02 2021, 06:48 AM , By : shenol
Is there any valid use for a sign-preserving left shift?
Is there any valid use for a sign-preserving left shift?
should help you out The Intel 80960 shli instruction behaves this way. The description says, “if the bits shifted out are not the same as the sign bit, an overflow fault is generated. If overflow occurs, the sign of the result is the same as the sign
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Guid
How does CPU perform operation that manipulate data that's less than a word size
How does CPU perform operation that manipulate data that's less than a word size
may help you . x86 is not a word-oriented architecture at all. Instructions are variable length with no alignment."Word size" is not a meaningful term on x86; some people may use it to refer to the register width, but instruction fetch / decode has n
TAG : assembly
Date : January 02 2021, 06:48 AM , By : hsdfhksh
Check if user input leads to overflow
Check if user input leads to overflow
Any of those help I have a trouble on checking if the overflow flag is set after the user enter a unsigned number , TL;DR: It's how it's supposed to be.
TAG : assembly
Date : January 02 2021, 06:48 AM , By : keird
What does it mean by a branch penalty?
What does it mean by a branch penalty?
To fix this issue Without (correct) branch prediction, fetch doesn't know what to fetch next until the ALU decides which way a conditional or indirect branch goes. So it stalls until the branch executes in the ALU.Or with an incorrect prediction, the
TAG : assembly
Date : January 02 2021, 06:48 AM , By : afds
Copying to arrays in NASM
Copying to arrays in NASM
Does that help I know about rep movsb but task has been to make it in loop byte after byte, I don't know if it could be done better way.
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Tony Siu
Reverse byte order in XMM or YMM register?
Reverse byte order in XMM or YMM register?
I wish this helpful for you Yes, use SSSE3 _mm_shuffle_epi8 or AVX2 _mm256_shuffle_epi8 to shuffle bytes within 16-byte AVX2 "lanes". Depending on the shuffle control vector, you can swap pairs of bytes, reverse 4-byte units, or reverse 8-byte units.
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Pancilobak
How to print ASCII array in Assembly?
How to print ASCII array in Assembly?
help you fix your problem I'm trying to make a car game in Assembly's graphic mode. For this, I have to print a car to the screen that I could move on the x-axis with the keyboard. I'm trying to print an ASCII array but it doesn't work. ,
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Sigfrieg
How to deny or invert the memory address
How to deny or invert the memory address
wish helps you Successive addresses store a single byte that can hold values from 0 to 255. For the values from 0 to FFFFh that you want to store, you would need 131072 bytes (65536*2). In 16-bit mode (real address mode) a memory segment can have 655
TAG : assembly
Date : January 02 2021, 06:48 AM , By : FriendL
MIPS: load byte instruction
MIPS: load byte instruction
Hope that helps Assume that the processor is executing the following instruction: , 0x305502db - 7 = 0x305502d4
TAG : assembly
Date : January 02 2021, 06:48 AM , By : ciops
How to find minimum signed value in array in assembly
How to find minimum signed value in array in assembly
hope this fix your issue Your algorithm doesn't make much sense. Your current code would correspond to something like this in C:
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Dave M
Bit Difference between 2 binary numbers in MIPS Assembly
Bit Difference between 2 binary numbers in MIPS Assembly
it fixes the issue XOR the bits together and then count the number of bits in the resulting number. To do that, you can loop over each bit, check if it is set (by using a bitmask and bitshift), and then increment a counter.I am purposefully leaving t
TAG : assembly
Date : January 02 2021, 06:48 AM , By : James Lupiani
Is it possible to wake up intel cores with INIT-SIPI-SIPI sequence with all cores in real mode?
Is it possible to wake up intel cores with INIT-SIPI-SIPI sequence with all cores in real mode?
To fix the issue you can do Is it possible to wake up intel cores with INIT-SIPI-SIPI sequence with all cores in real mode?
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Brianna
shift right and shift left assembly language
shift right and shift left assembly language
Does that help If I want to say for example bx is a number: , What will be the new bx value? Does it stay the same?
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Tonix
ASSUME directive using masm
ASSUME directive using masm
should help you out The MASM 6.1 documentation is a good resource for writing real-mode segmented code (non-FLAT models). Page 43-47 have good info on ASSUME, and segment word sizes. What you are encountering is a side effect of a rather subtle way i
TAG : assembly
Date : January 02 2021, 06:48 AM , By : user184406
IDIVQ instruction works odd . . . 16 mod 100 = 0?
IDIVQ instruction works odd . . . 16 mod 100 = 0?
this will help You are not running the code you are showing or your cpu is broken (unlikely).
TAG : assembly
Date : January 02 2021, 06:48 AM , By : 40a
Working with percentages using integer division in x86 assembly
Working with percentages using integer division in x86 assembly
wish of those help I edited your question completely because it was not easy to understand it. I hope that I fully understood your question and the question is still asking what you wants to ask.The problem you describe is actually not an Assembly la
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Thomas Gueze
Objdump swapping fsubrp to fsubp on compiled assembly?
Objdump swapping fsubrp to fsubp on compiled assembly?
it helps some times This is a known bug with gas which unfortunately cannot be fixed; reversed vs. non-reversed mnemonics for x87 non-commutative floating point instructions with register operands (like fdiv vs. fdivr) is the wrong way round. As comp
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Gabriel
Which value does EDX have after logic NEG and AND instructions?
Which value does EDX have after logic NEG and AND instructions?
this will help Let's take this one instruction at a time. The NOT ax will change EAX from
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Wilfred Knigge
intterrupt that checks if a key was pressed and reads which key it was
intterrupt that checks if a key was pressed and reads which key it was
I wish this helpful for you I've tried int 16h \01 but all it did was changed direction once and then continued moving in that direction.
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Jojo
Is it possible to get LLVM-IR from Assembly file?
Is it possible to get LLVM-IR from Assembly file?
wish of those help Your question isn't fundamentally different from Is it possible to translate an assembly language to LLVM IR, optimize it and then recompile it to a different architecture?.asm source and binary executables / object files are basic
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Mikael
Finding GCD of an array of n numbers in assembly without external variables
Finding GCD of an array of n numbers in assembly without external variables
Hope this helps Step 1, cleanup and corrections Removing redundant instructions, re-arrangeing the code for less jumping, removing the potential infinite loop if 2 identical numbers are used and zeroing EDX before each division:
TAG : assembly
Date : January 02 2021, 06:48 AM , By : user122937
How do old CPUs execute the new ENDBR64 and ENDBR32 instructions?
How do old CPUs execute the new ENDBR64 and ENDBR32 instructions?
this will help Older GDB decodes F3 0F 1E FA ENDBR64 as repz nop edx.Single-stepping it on a Core 2 (Merom) in 64-bit mode produces no change in architectural state, and no faults / exceptions. (Tested in GDB 7.10 on an old Ubuntu 15.10 install).
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Liviu Aileni
Loading the red component of a 24-bit bitmap image into an array
Loading the red component of a 24-bit bitmap image into an array
I wish this help you Assuming they're stored or then I imagine this is your issue:
TAG : assembly
Date : January 02 2021, 06:48 AM , By : Noah
I am not understanding this assemby language program for what(what will be the input or output)
I am not understanding this assemby language program for what(what will be the input or output)
I wish this help you I got this assembly program from my mate..My teacher provided it .Unfortunately I missed it out..Please someone say me that what the program write for (input/output or objectives) , I've commented it for you:
TAG : assembly
Date : January 02 2021, 06:48 AM , By : dbarbot

shadow
Privacy Policy - Terms - Contact Us © scrbit.com