428 questions
1
vote
1
answer
70
views
How many segments can be stored in win16 executable format? (very strange and unaccountable format)
Windows 16bit executable file, as we known, contains its own header and many other tables, one of those is a segment table. The header contains two fields (about segment table): segment table offset ...
4
votes
1
answer
191
views
Is 0x0000:0x7000 a unsafe address to load your kernel? Or is it just qemu annoying me
So I thought I'd try to make a DOS copy but it runs on a floppy and its just a simple plug and play with fat12 partition for user applications and drivers.
I first attempted to load my kernel using ...
1
vote
1
answer
115
views
I'm writing an Assembly x86 bootloader, but the printing function doesn't print the given string correctly
I'm writing a bootloader in x86 Assembly for my operating system. Note that I have already wrote a few bootloaders and I never faced this problem. This is the code that I compile with NASM (precisely ...
2
votes
1
answer
103
views
why is there a "RETF 4" at the end of the disassembled function?
im disassembling the old 1989 Borland tool TDSTRIP.EXE that can extract Turbo Debugger information from executables and stumpled over this path-normalizing function
this is the signature im using ...
0
votes
0
answers
93
views
How to set/force EXE stack size with 1988 Turbo C 2.0 for a reverse engineering project
i try to reconstruct a Turbo C 2.0 DOS small-memory-model executable C source exact-as-possible from disassembly (its an DOS reverse-engineering project and im using IDA Pro disassembling and UASM for ...
1
vote
0
answers
49
views
How to print a symbol for a user-provided number of times in DOS assembly x86? [duplicate]
I am a newbie here trying to learn assembly, so I apologise for any trivial mistakes.
The following code is supposed to print '*' n times, where n is a user-provided one-digit decimal integer. However,...
0
votes
1
answer
100
views
What happens if I only write 1 byte to an external 16bit register of SDRAM [closed]
I am working on a project which uses a STM32F429ZIT6 (32-bit) with an external 64MB of SDRAM (4M*16-bit registers). In the project I have seen the SDRAM accessed as:
void LCD_mirror(void)
{
unsigned ...
0
votes
1
answer
130
views
16-bit ALU with multiplication - splitting 32-bit product for 16-bit output?
I'm having a hard time realising the multiplication process inside my 16-bit ALU. The obvious problem is that I have 2 16-bit inputs and one 16-bit output when the result is actually of 32-bits. I ...
3
votes
1
answer
125
views
Save as tiff - 16bit unsigned
I receive 'integer 2 unsigned tiff' images from colleagues. They look fine in 'Paint' and in DM. After data processing in DM, I have real images. After taking care of the range, ConvertToShort() ...
0
votes
0
answers
131
views
How can i use allocated memory with INT 21h, 48h in MASM?
I've been working a program in x86 assembly for MSDOS, that opens a file and displays it's contents..however, i'm stumped on the reading the file part..
Basically, i dynamically allocated filesize ...
0
votes
1
answer
170
views
16 bit register converting to two 8 bytes using vb.net in visual studio
converting the 16 bit data to 8 bit and then reversing it back to 16 bits
Module Module1
Sub Main()
' Original 16-bit data
Dim originalValue As UShort = &HA91
' Split ...
0
votes
1
answer
127
views
Writing an NC-file in int-16 data type in r
I have a numeric array of dimensions 1386, 585, 1800 (Lon,Lat,time) and want to store this array in a nc-file format.
Since the data spans 150 years and has a 4-km resolution it turned out to be huge ...
-1
votes
1
answer
125
views
I search a unit to solve the turbo pascal 255 string limit
is there a framework/unit that I can fill with strings to solve the 255 string limit?
Example with a loop
MyStringAllwaysWithOneString := 'X';
for i := 0 to CompleteStringLength do
begin
...
1
vote
1
answer
74
views
VGA output not showing if DI > 32767
I have a 16-bit assembly program (NASM) that changes to VGA graphics mode and tries to fill the entire screen with a solid color, but i can only fill up to 32767 (0x7fff) pixels (instead of the full ...
1
vote
0
answers
154
views
Problem using Open Watcom v2 for generating a bare metal application for 80186 CPU
I'm trying to use Open Watcom v2 to generate a bare metal application for an 80186 CPU. I have 64KB of ROM(flash) at 0xF0000 and 64 KB of RAM at 0x0 (there is more but this is enough for what I want ...
0
votes
0
answers
100
views
Second sector kernel not printing strings (16-bit ASM)
So I'm working on a 16-bit operating system, and I have loaded the second stage that will act as my kernel. The only issue is that the kernel doesn't print any strings, just blank characters.
The ...
0
votes
1
answer
102
views
How can I get the index of an array in DOS Assembly x86 (16-bit)?
I would like to know how to deal with the index of an array. My objective is to get and change the value at a specific index.
My array looks like this:
Dots_pos dw firstLine, firstLine+ 8, ...
-2
votes
1
answer
100
views
Turbo Assembler 16 BIT Encryption Binary File
I am trying to encrypt binary file. But program does not encrypt anything and it gets errors when writing file on disk. So I dont get encrypted file on disk and program stucks with infinite loop ...
-1
votes
1
answer
288
views
C# EmguCV PictureBox - How to display unsigned 16 bit grayscale images?
I have a monochrome camera in my project that I read images of at either 8bit/16bit depth.
I'm using EmguCV library to create a Mat object out of byte array that I read off the camera and want to ...
2
votes
2
answers
84
views
OS on a real-machine
I create a small os (not finished) only with assembly 16 bit that works with qemu-system-i386.
But now i want to test it on a real machine and in case of errors make it compatible with a real PC.
This ...
1
vote
1
answer
63
views
Assembly 16bit real mode - CMPS return always 0
I want to make a small operating system in 16 bit assembly.
In this code I'm creating a sort of 'terminal' where I take the user input and if the input is shutdown then start the function to shut ...
1
vote
1
answer
106
views
convert an array of ascii numbers in binary numbers assembly x86 16-bit
I want to convert all the ascii numbers that i stored in the array 'VECTOR' in binary form because i want to make the sum of them, but i don't know how to count how many digits that a number has to ...
1
vote
1
answer
71
views
Why my print function doesn't print my string?
I just started creating my first operating system, I wanted to start with a very simple bootloader that basically just prints a very simple string. But I can't figure out why, whatever string, the ...
-3
votes
1
answer
80
views
How to reverse the byte shifts after I have extracted a value in C?
void check_drop(char *drop_pathname) {
FILE *fp;
fp = fopen(drop_pathname, "rb");
int count = 0, pathname_length = 0, c;
uint8_t drop_hash = 0, current_hash = 0;
while ((...
0
votes
1
answer
117
views
In Java: How to make a DMX moving generator that uses 16Bit
I working one a small Java project controlling a DMX-light, a “moving head”.
So far, I can control the moving head using Art-Net, doing the most simple stuff – like setting a value for a channel.
Now ...
0
votes
0
answers
59
views
webworker and module import from fast-png does not work
I need 16 bit greyscale images because of the detail accuracy for depth information. I use fast-png and am very happy with it. After the import, I only have to use the decode command to get the image ...
1
vote
1
answer
590
views
Reading a signed bits in Lua
I have a 16-bit in a string but this is the representation of a signed number. Is there a way/function that do the converson from signed bits to decimal ?
The function tonumber() assumes the bits are ...
-1
votes
1
answer
228
views
I don't know how this 16Bit value change to decimal value
How 0x3333 0x41DF could be 27.9 value?
I use hexadecimal to decimal value but it was 1B.E6666666666666666666.
0
votes
2
answers
495
views
Guessing Game - NASM ASSEMBLY KERNEL
I'm trying to make a guessing game in NASM assembly using a kernel. The boot loader just points to the kernel file. The kernel file stores everything. All the functions and variables for the game; ...
-1
votes
3
answers
130
views
Creating and analyzing a control word in C Code
I wanted to create and analyze a 16-bit control word, this should be done in C code. Each bit should be evaluated, since each bit has a specific function. There can be an instruction that several bits ...
1
vote
0
answers
164
views
Trying to find a way to make java's sound API accept 24 bit audio files and files with more than 2 channels
I've been working on a spectrum analyzer this summer and I just bumped into an annoying problem. Playing sounds is a pretty important part of my project and I just learned that the java sound API (...
0
votes
1
answer
4k
views
Get otvdm (aka winevdm) to run 16-bits applications automatically
I am working on the a project that requires me to run a Makefile which calls on several 16-bit .exe scattered in my F drive. I have looked into using otvdm (aka winevdm) to run the 16-bit applications ...
0
votes
0
answers
114
views
Does Image.fromarray() accept 16 bit image
I am trying to apply the function Image.fromarray() to a 16 bit image but i amgetting this error : TypeError: Cannot handle this data type: (1, 1, 3), <f4
I know that this error occurs when the ...
2
votes
0
answers
1k
views
/usr/bin/ld: cannot find -lgcc: No such file or directory
Recently, I was trying to compile a C program into 16-bit with this command:
gcc -m16 main.c
all was going well until I saw these errors:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-...
0
votes
1
answer
97
views
Assembly 16 bit illogical mistake (?)
I don't understand why this code print me the char I've insert back and the alphabet string if nobody told him to do it...
.model
.stack 100h
.data
lettere DB 10 DUP(?)
frase1 DB 10,13,"...
0
votes
0
answers
456
views
16 bit to 12 bit conversion between microcontroller and dac
#include "mbed.h"
DigitalOut gpo(PTD7);
AnalogOut Aout(PTE30);
float x;
unsigned int i,j;
int main() {
x=0;
i=0;
while(1) {
gpo=i & 1;
x=16*2047.0*(1+sin(2*3.142*i/...
0
votes
1
answer
69
views
Covert from 16bit representation
I receive 16bit data as UInt16 on Swift code.
16bit data correspond to the following decimal number
0x0000:-2
0x8000:0
0xFFFF:+2
How to convert 16 bit data into decimal number correspond as above on ...
2
votes
1
answer
1k
views
How to convert 16bit raw data into png image to show in browser?
I have 16 bit raw data as base64 string. Want to convert that into png image, based on depth 8,16,24.
// code to process 16bit buffer array
function process16bitBitmap(buffer, options = {}) {
const ...
0
votes
0
answers
179
views
How do I compile my 16 bit Mac assembly code?
So I'm trying to assemble this piece of 16bit assembly code on my Mac (Monterey):
global _main
section .text
_main:
mov ah, 0x0e
mov al, '!'
int 0x10
mov ah, 0x4c
...
0
votes
0
answers
154
views
decode 16bit number from BLE sensor
Im reading minor data from TMPS BLE sensor. In this minor 16bit number value is encode Pressure value (bar), Temperature (°C) and also battery status I think.
I can't figure out how to decode this ...
2
votes
2
answers
3k
views
creating a 16 bit tiff image
I am trying to create a 16-bit greyscale ring simulation and for some reason, it just does not work.
Let me explain, at the beginning, I wrote it in 8-bit format, and then I realized I need it in 16-...
0
votes
0
answers
806
views
Find maximum intensity count from gray scale 16 bit tiff image
original imageI have a 16 bit tiff image. I would like to get following information from the image
maximum intensity count.
even though my bit size is 16 bit, why is my color bar restricted to 256 ...
1
vote
1
answer
1k
views
Convert strings to 16Bit UTF integers in Javascript
I'm working with firebase firestore and for some reason I need to hash every new user document ID to integer specifically a 16Bit UTF integer. Mostly it's an attempt at duplicating the .hashcode ...
1
vote
0
answers
285
views
control of LEDs with 16bit PWM with protocol DMX512/1990 using only one DMX address
I have received DMX LED drivers from a company called G&G in China, unfortunately with extremely poor documentation. This is how the drivers look like, under the picture are the specs:
The model ...
1
vote
0
answers
324
views
How can I display a diagonal line with a rainbow gradient in a 16-bit assembly simulator whose colours (in the source code) are in hexadecimal?
I'm trying to programmatically display a line in a 16-bit assembly simulator with a rainbow gradient like in this picture:
The online simulator I'm using is this one and you can find the source code ...
1
vote
1
answer
988
views
Is ffmpeg palettgen rgb565 possible?
I am using the following commandline under windows to convert a video file to individual frames for use of a project. But the project will eventually use a 16bit RGB565 palette. Is it possible to use ...
3
votes
2
answers
3k
views
Lossless compression of 10bit images (stored as 16bit pngs) with ffmpeg - HEVC preferably
I am trying to encode 10 bit images losslessly in a video format, preferably using HEVC encoding. The images are stored as 16 bit png files (but only use 10 bit) and I have been working with ffmpeg to ...
0
votes
0
answers
852
views
How to display a 48 bit RGB image (16 bit per channel) in JavaFX?
I'm using JavaFX and I have a 16bit grayscale image that I'm able to show with the following code:
public Image createNewImageFromArrayPixels(int[][] pixels) {
int width = pixels....
0
votes
1
answer
78
views
Comparing the freshly inputted text to a list of available commands in asm
how do i compare the string in the buffer with a command like '--help'
how would you compare the freshly inputted text in the buffer with a command here is my code
xor ax, ax
mov ds, ax
mov es, ax
...
0
votes
1
answer
2k
views
How to save keyboard input to a register in assembly?
So i am basically making a basic commandline os and i have made it so that it can take keyboard presses and a procedure to go to a new line when i press enter but i want it to store the command as a ...