So I’m supposed to push into and pop from a stack using LEGv8 Assembly Language. I think I’ve managed to push using loop but I can’t figure out how to pop using a..
Tag : assembly
Heres my code
`mov ah, 0x0e
mov al, ‘a’
int 0x10
bits 16
org ..
Write a LMC program that can convert an n-bit binary number into a decimal number. Display the natural number as output before halting the program. The first input determines the value for n. It is assumed this value will be equal to four, or greater. For example, if the first input is eight (8) then eight subsequent inputs are requested. If the subsequent inputs number were 1, 0, 0, 1, 0, 0, 0, 0 then the output would be 9.n input values are provided by the user, one for each bit: The first of these is the least-significant bit. The n’th input is the most-significan..
so Im trying to write a code that a part of it is getting the pixel color when I left click
here is the code:
proc mouse_click
mov ax,0h ;resets the mouse
i..
The program takes an integer input (let’s call it n) to determine the number of bits. Then, it asks for n more inputs (each representing a bit of a binary number). After receiving all the inputs, it converts the binary number into a decimal number and displays it as o..
hello im making my own operating system and im trying to compile it with nasm but theres is some error and ive checked the code and i think iv’e typed it..
Write a program to calculate the parity of a 32-bit memory operand. The formula for calculating the parity of a binary number is to XOR all the bits together. Refer to section..
assume cs:code, ds:data data segment array dw 12h,33h,00h,0FFh counter db 3 dup(0) size equ 4 msg db ‘Odd $’ msg1 db ‘Even $’ ;Error here msg2 db ‘Odd $’ ends data code segment start: mov ax,data mov ds,ax mov es,ax mov cx,size mov si, offset array mov di, offset counter std iter: mov ax,[si] cmp ..
I am making a program to take input of an int and print the ASCII char based on the int but I don’t know how to convert the ..
.globl __start .rodata msg1: .string “Enter a number (or negative number to quit): ” msg2: .string “The factorial of ” msg3: .string ” is: ” msg4: .string “nDo you want to calculate another factorial (y/n)? ” .text __start: loop: # Print prompt for user input li a0, 4 # syscall for write string la a1, ..