x86-16

The difference between signed and unsigned, what means a negative byte?

二次信任 提交于 2021-01-28 07:02:41
问题 I need to solve the problem below, but I don't understand the concepts needed for solution. Let's consider the following string of doublewords: B234* A68C *h, * 52B4 *78C8h, * 1AB3 *C470h, F9DC* 98B6 *h. It is required to: 1) print on the screen the words ' ranks that have the minimum value from each doubleword (considering them unsigned ) The answer is '2112' (the bold words have the minimum value) 2) print on the screen the sum of the bytes that have the maximum value from these words

What is the value of segment registers in 8086?

时光毁灭记忆、已成空白 提交于 2021-01-28 03:09:14
问题 I have just started to read about intel 8086 and have a question concerning its memory. I read that the address bus is 20-bit wide, which means the address space is 1MB, and this space is divided into segments. the question is: the four segment registers, CS , DS , SS and ES , are they read only or I can set their values, and which are their default values? I saw the following assembly tutorial: ORG 100h MOV AX, 0B800h ; set AX = B800h (VGA memory). MOV DS, AX ; copy value of AX to DS. MOV CL

Finding the substring in an input string

谁说我不能喝 提交于 2021-01-27 23:12:38
问题 I have this assembly program where I need to find the substring in the main string I input. My problem is that it always outputs the "word found" even if I typed two completely different words. I don't know which part of my loop or condition is wrong. Please help me figure it out. Also, please suggest some string instructions that could be used in checking for a substring so that I can shorten my code. I am really confused with how the cmpsb works, I only tried to use it. Btw, I don't know

Program keeps returning to same line after ISR. (Assembly 8086)

蓝咒 提交于 2021-01-27 11:53:53
问题 I'm working with interrupts and I'm facing this problem while running my code: DATA SEGMENT INPUTV DW 0035H, 0855H, 2011H, 1359H OUTPUTV DB 4 DUP(0) DIVIDER DB 09 ERROR_FLAG DB 0 DATA ENDS _STACK SEGMENT STACK DW 100 DUP(0) TOP_STACK LABEL WORD _STACK ENDS CODE SEGMENT ASSUME CS:CODE, DS:DATA, SS:_STACK MAIN: MOV AX, _STACK MOV SS, AX MOV SP, OFFSET TOP_STACK MOV AX, DATA MOV DS, AX MOV AX, 0000H MOV ES, AX MOV WORD PTR ES:0002, SEG INT_PROC ;PUSHING CS TO STACK MOV WORD PTR ES:0000, OFFSET

Program keeps returning to same line after ISR. (Assembly 8086)

时光毁灭记忆、已成空白 提交于 2021-01-27 11:51:51
问题 I'm working with interrupts and I'm facing this problem while running my code: DATA SEGMENT INPUTV DW 0035H, 0855H, 2011H, 1359H OUTPUTV DB 4 DUP(0) DIVIDER DB 09 ERROR_FLAG DB 0 DATA ENDS _STACK SEGMENT STACK DW 100 DUP(0) TOP_STACK LABEL WORD _STACK ENDS CODE SEGMENT ASSUME CS:CODE, DS:DATA, SS:_STACK MAIN: MOV AX, _STACK MOV SS, AX MOV SP, OFFSET TOP_STACK MOV AX, DATA MOV DS, AX MOV AX, 0000H MOV ES, AX MOV WORD PTR ES:0002, SEG INT_PROC ;PUSHING CS TO STACK MOV WORD PTR ES:0000, OFFSET

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

Bootloader is Not loading the kernel

江枫思渺然 提交于 2021-01-24 10:56:47
问题 I am developing my Operating System. I got error on booting my OS. The error was: KERNEL.BIN not found! Here are the Codes: Boot.asm ; The Aqua_Seven_OS Operating System bootloader ; ================================================================== BITS 16 jmp short bootloader_start ; Jump past disk description section nop ; Pad out before disk description ; ------------------------------------------------------------------ ; Disk description table, to make it a valid floppy ; Note: some of

Assembly - safe competition

白昼怎懂夜的黑 提交于 2021-01-07 11:30:30
问题 I participate in the competition named 'Code guru - Extreme' In this competition there is safes and keys in assembly 8086. To a safe and a key there are joint data segment, and you need to make a key that break the safe. Example to safe: L: mov ax, [1234] cmp ax, 5678 jne L Example to key that break the safe L: mov ax, 5678 mov [1234], ax jne L And now I have a safe that I can not break it and al, 0FEh push ax clc mul ax xor ax, dx or al, 1 loc_10A: sub [0A2h], ax pop ax push ax jnz loc_10A

Assembly - safe competition

蓝咒 提交于 2021-01-07 11:29:58
问题 I participate in the competition named 'Code guru - Extreme' In this competition there is safes and keys in assembly 8086. To a safe and a key there are joint data segment, and you need to make a key that break the safe. Example to safe: L: mov ax, [1234] cmp ax, 5678 jne L Example to key that break the safe L: mov ax, 5678 mov [1234], ax jne L And now I have a safe that I can not break it and al, 0FEh push ax clc mul ax xor ax, dx or al, 1 loc_10A: sub [0A2h], ax pop ax push ax jnz loc_10A