Questions tagged [16-bit]

Referring to computer architecture with addresses and other data units 16 bits wide.

In computer architecture, 16-bit integers, memory addresses, or other data units are those that are at most 16 bits (2 octets) wide. Also, 16-bit CPU and ALU architectures are those that are based on registers, address buses, or data buses of that size.

414 questions
-1
votes
1 answer

Finding the inverse of a function that converts 16 bit unsigned integer to double

I have a function that takes in a 16 bit unsigned integer value and converts it to a double. The data comes from a temperature sensor (MCP9808) and the function converts it to degrees Celsius. The function is defined as follows: double…
marco
  • 93
  • 1
  • 1
  • 7
-1
votes
1 answer

16 bit integer array compression

I'm trying to compress a large array of 16 bit integers (acquired through camera) and I want to compress it as fast as possible. However after looking at several options, it seems that most libraries are optimized for 32 bit data. (e.g…
-1
votes
1 answer

How data saved in memory DOS 16 bit ASM?

I am new to ASM. I have question regarding how data saved in memory. Here is my ASM 16 bit code ;db.com .model small .code org 100h start: jmp proses A db '123' B dw 0abcdh proses: int 20h end start Then I try to debug with -d command The above…
Dark Cyber
  • 2,181
  • 7
  • 44
  • 68
-1
votes
1 answer

NASM Assembly 16bit "invalid combination of opcode and operands"

So I'm trying to write a program that creates a file and my name in it. But I get the "invalid combination of opcode and operands" on the mov handle, ax, and I don't know why. I saw here that you can do it so why can't I. Thank you in advance for…
-1
votes
2 answers

How and is the output of my code is 842?

#include int main(){ printf("%d\t",sizeof(6.5)); printf("%d\t",sizeof(90000)); printf("%d\t",sizeof('a')); return 0; } When I'm compiling my code, the output will be: "842". Can somebody explain why I get this output?
-1
votes
1 answer

Printing the hexadecimal value of assembly registers, moving 16 bit registers into 8 bit ones and other assembly questions

I'm writing a function to print each register in my 16-bit real mode assembly operating system. I've come across a few problems: 1 Moving a 16-bit register into an 8-bit one mov al, bx This gives me error: invalid combinations of opcodes and…
-1
votes
1 answer

16 bit Assembly not printing character

I've got a basic bootloader that should read the root sectors from a FAT12 formatted Floppy into the memory. (that part works) but after implementing that it stopped writing characters to the screen. Last time it did this was because I forgot to POP…
Tim van Osch
  • 483
  • 4
  • 16
-1
votes
1 answer

16-bit unconditional jump, how the operand works?

The 16-bit DOS unconditional jmp assembly instruction to machine code: jmp FF translated to EBFD jmp 100 translated to EBFE jmp 2 translated to E9FFFE jmp eax translated to 66FFE0 jmp 80 translated to E97DFF I understand that EB, E9 and 66…
justyy
  • 5,831
  • 4
  • 40
  • 73
-1
votes
1 answer

16 bit MUL assembly

On x86 16-bit assembly, if there is a 1 in ax and 0x10 (16) in cl, the following code doesn't put 0x1000 in cl: mul cl ; ax = 0x 10 mul cl ; ax = 0x 100 mul cl ; ax = 0x0000 (not 0x1000) Why doesn't this code work as expected?
Milmar
  • 17
  • 1
  • 2
-1
votes
3 answers

How to shift a bits in a Ushort 16 bit integer in VB.NET?

I have a 16 bit unsigned integer and its values are like this: byte_val1 = 1000000000000001 From this I need to right shift this and make it like this: 1100000000000000 I have done this: byte_val1 = byte_val1 >> 1 and getting byte_val1 =…
Arindam Das
  • 699
  • 4
  • 20
  • 39
-2
votes
2 answers

How to fix error L2029 on microsoft 16-bit linker?

I'm trying to assemble debug.exe/com from the MS-DOS 2.0 source code, at first it wasn't working but I've been changing some filenames and I've managed to get an .obj file, using link(16-bit version) there is an error (error L2029: unresolved…
JeffLee
  • 111
  • 1
  • 10
-2
votes
1 answer

16-bit encoding that has all bits mapped to some value

UTF-32 has its last bits zeroed. As I understand it UTF-16 doesn't use all its bits either. Is there a 16-bit encoding that has all bit combinations mapped to some value, preferably a subset of UTF, like ASCII for 7-bit?
J Alan
  • 77
  • 1
  • 11
-2
votes
2 answers

8051 16 bit addition/multiplication result 16 bit instead of 32 bit

I have a problem. In this program the variable x should be set to 0x10000 but in both operations the result is 0. This is not the main program but a test to find the reason for the error. I am currently making a 64 bit multiplier with hex input. I…
-2
votes
2 answers

How to use 32 bit variable for 16 bit TIMER register?

If one need to write a function that takes, as an argument a 32 bit variable and assigns it to 16 bit TIMER register (the embedded target have 16 bit resolution timer and we need to deal with 32 bit values to increase the resolution of the timer…
Itzik Chaimov
  • 89
  • 1
  • 10
-2
votes
1 answer

FCB and Int 21h/function 23h

I need to get the file size using Int 21h / function 23h. I don't have any idea how FCB works, nor do I know how to use it. The description for Function 23h given in this documentation is: Function 23h (35) Get File Size, Using FCBs Returns…
paulc
  • 125
  • 6
1 2 3
27
28