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
11
votes
3 answers

GLSL-ES Random grainy noise with FP16 limit

I am trying to write a compact and simple noise function with a strictly FP16 limit. This is with what I came out so far, but I think somewhere on the operation the number gets too small for fract or sin, since in the GPU I must write this for these…
PerracoLabs
  • 16,449
  • 15
  • 74
  • 127
9
votes
5 answers

Print integer to console in x86 assembly

When I add two values in 16 bit assembly, what is the best way to print the result to console? At the moment I have this code: ;;---CODE START---;; mov ax, 1 ;put 1 into ax add ax, 2 ; add 2 to ax current value mov ah,2 ; 2 is the function…
pacman.
  • 217
  • 1
  • 2
  • 9
9
votes
1 answer

Is the Z80 'Game Boy' CPU 8 or 16 bits?

I was reading a tutorial about creating a Game Boy emulator, I understand that the Game Boy uses an 8-bit CPU, but I can't understand why the Gameboy uses two types of data: bytes (8 bits) and words (16 bits). If the CPU has a capacity of 8 bits,…
Toni
  • 95
  • 6
8
votes
3 answers

16 bit asm instruction set

What set of instructions is used in COM files? I assumed it was 8086, but it seems that I was wrong. In a 8086 manual I found, shl can only accept 1 or cl for its second argument, while immediate values other than 1 work fine for me. In case it…
Karolis Juodelė
  • 3,708
  • 1
  • 19
  • 32
8
votes
8 answers

c++ defined 16bit (high) color

I am working on a project with a TFT touch screen. With this screen there is an included library. But after some reading, I still don't get something. In the library there are some defines regarding colors: /* some RGB color definitions …
Bart Teunissen
  • 1,420
  • 5
  • 20
  • 43
7
votes
2 answers

Bootloader Strange Behavior

I have been trying to design a simple OS, just the boot sector, and 16-bit real mode with interrupts. I have finally been able to make the OS / bootloader, that I tested in virtual box, and it worked. I then burned the image to a CD, and booted it…
codesmith
  • 561
  • 1
  • 3
  • 17
7
votes
1 answer

Is there a collision rate difference between one 32-bit hash vs two 16 bit hashes?

I am working on a system where hash collisions would be a problem. Essentially there is a system that references items in a hash-table+tree structure. However the system in question first compiles text-files containing paths in the structure into a…
Exodist
  • 629
  • 5
  • 15
7
votes
2 answers

How to pass/retrieve DOS command-line parameters in a 16-bit assembly program?

I am writing some little tools for MS-DOS. Now I'm writing a Shutdown.com, like for Windows XP and greater. I have already written the entire code, now I just need to pass the argument from DOS. I need to pass the parameters "-r" to reboot and "-s"…
MendaxRox
  • 101
  • 1
  • 7
7
votes
1 answer

How to sleep in bare-metal 16 bit x86 assembly?

I want to halt the execution about 0.1 seconds, regardless of the clock speed of the CPU. The code should run directly from a boot device, it should therefore not use DOS interrupts. I'm currently using int 15h, but this seems to conflict with the…
user1798024
7
votes
3 answers

How to check if two System.Drawing.Color structures represent the same color in 16 bit color depth?

How can I check if two System.Drawing.Color structures represent the same color in 16 bit color depth (or generally based on the value of Screen.PrimaryScreen.BitsPerPixel)? Let's say I set Form.TransparencyKey to Value1 (of Color type), I want to…
TechAurelian
  • 5,561
  • 5
  • 50
  • 65
7
votes
2 answers

Can I convert a 16-bit .exe program to a 64-bit .exe?

I realize that there will likely be no special converter programs or anything easy like that for such a task, but it imperative that I find some way to get a 16-bit program to run in 64-bit Windows. Due to the large amount of resources that must be…
Variadicism
  • 624
  • 1
  • 7
  • 17
7
votes
3 answers

Confused with CMPSB instruction

I have been looking at this code and I'm confused about the rep cmpsb line. .LOOP: push cx mov cx, 0x000B ; eleven character name mov si, ImageName ; image name to find …
Hudson Worden
  • 2,263
  • 8
  • 30
  • 45
6
votes
1 answer

Best approach for debugging a Win 16-bit application?

I must reverse a legacy windows (16-bit, NE exec) application that controls an old DAQ that I must interface somehow with upgraded hardware. I've been able to disassemble the exec using W32Dasm (and WindowsCodeBack as well, the only two from many…
user1179145
  • 61
  • 1
  • 2
6
votes
1 answer

manipulating 32 bit numbers with 16 bit registers in 8086

Im trying to write a program which get two 6-digit decimal numbers and show the addition of them, but in 16 bit 8086 i defined numbers as double word and put LO in WORD 1 and HO in word 2. similar to below code but i dont have any idea to do…
6
votes
1 answer

16-bit C compiler for real-mode kernel development?

I've tried nearly every C compiler with every setting, and I have yet to find a C compiler that can compile C into Intel x86 code that is suitable for Real Mode kernel development. I don't need any spiels on why you should use protected mode; I just…
Joseph Caruso
  • 175
  • 1
  • 11
1
2
3
27 28