16-bit

how can i get the dos exe build from segments in multiple asm files binary identical to the single asm file version

喜夏-厌秋 提交于 2019-12-11 07:36:15
问题 for an reverse engineering project i want to split an IDA Pro produced asm file into multiple segment files which must result in binary identical executeables binary equal means to me 100% equal: segment-starts, ordering, sizes, opcodes etc. - because its from a reversed exe and only some of the symbols are detected by IDA, mostly just variable or function offsets, etc. so i can't rely on the assembler own ordering of segments,symbols etc. - it needs to be 100% exact or else i introduce

16 bit C code for real mode kernel

你离开我真会死。 提交于 2019-12-10 16:03:18
问题 I don't know how to compile my C kernel for 16 bit real mode. I have tried a variety of compilers with no luck. My bootloader simply loads raw sectors from the floppy (my kernel lives right after the first sector on the disk) to the physical memory address 1000h:0000h then jumps to it. How can I compile my C kernel to work in 16 bit real mode? my basic kernel: void OSmain() { unsigned char *videoram = (unsigned char *) 0xb8000; videoram[0] = 65; /* character 'A' */ videoram[1] = 0x07; /*

Confused with CMPSB instruction

非 Y 不嫁゛ 提交于 2019-12-10 14:20:15
问题 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 push di rep cmpsb ; test for entry match pop di je LOAD_FAT pop cx add di, 0x0020 ; queue next directory entry loop .LOOP jmp FAILURE I understand that it repeats cmpsb cx times but how does this compare the two strings? Say for example was comparing "Hey\0" and "hey\0" and this loop was comparing 4 character strings. The

Options to Convert 16 bit Image

岁酱吖の 提交于 2019-12-10 11:50:47
问题 when i open a 16 bit image in tiff format, it opens up as a black image. The 16-bit tiff image only opens in the program ImageJ; however, it does not open in Preview. I am wondering what my options are now to view the format in an easier way that does not reduce the resolution than to open ImageJ to view it. Should I convert it to an 8-bit format, but wouldn't I lose data when the format is reduced from 16 to 8 bit? Also, I was thinking about converting the tiff image to jpeg, but would that

C++ 16 bit grayscale gradient image from 2D array

落花浮王杯 提交于 2019-12-10 10:39:49
问题 I'm currently trying to build a 16 bit grayscale "gradient" image but my output looks weird so I'm clearly not understanding this correctly. I was hoping somebody could shine some knowledge on my issue. I think that the "bitmap" I write is wrong? But I'm not sure. #include "CImg.h" using namespace std; unsigned short buffer[1250][1250]; void fill_buffer() { unsigned short temp_data = 0; for (int i =0;i < 1250; i++) { for (int j =0 ;j < 1250;j++) { buffer[i][j] = temp_data; } temp_data += 20;

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

旧城冷巷雨未停 提交于 2019-12-09 06:27:26
问题 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" to shutdown. How can I do it? I'm using TASM(Turbo Assembler 4.1) on Windows 98 to link and compile. I'm looking for a very simple way to do it, and if possible, still a .COM program. I'm looking exactly like the ARGV and ARGC from C language, but

How to run 16 bit code on 32 bit Linux?

╄→尐↘猪︶ㄣ 提交于 2019-12-08 01:14:47
问题 I have written a small 16-bit assembly program that writes some values in some memory locations.Is there a way I can test it in 32-bit protected mode on Linux? 回答1: qemu, dosbox, bochs 回答2: Yes, 16-bit code is supported in user processes in Linux. The system call to do it is called vm86() (there's a man page, but there's not much in it). It is, naturally, only works on x86 platforms (and 32-bit only). If you want an example, the ELKS project has a complete tool for running ELKS 8086 binaries

what is meant by 32-bit application?

核能气质少年 提交于 2019-12-07 18:34:02
问题 I am not sure what is meant by 16-bit or 32-bit applications. Is that a 16-bit application is an application which would not require more than 2^16 bytes of memory space? Does this 16-bit refers to the max size of the application? 回答1: A 32-bit application is software that runs in a 32-bit flat address space. Answers to common questions Will a 64 bit CPU run a standard (32-bit) program on a 64-bit version of an OS? Yes it will. 64 bit systems are backward compatible with the 32 bit

Android: How to get pixels of a single channel 16bit PNG Bitmap

浪尽此生 提交于 2019-12-06 15:13:49
问题 I have a png file created with python PIL that contains an height map (positive values). The format is : single channel (grey level) at 16bit, thus 16 bit per pixel. I read the file on android with BitmapFactory.decodeStream(<...data input stream...>); I correctly get the size of the image through getWidth() and getHeight() . However when I loop though the pixels calling the getPixel(i,j) I obtain negative values, something like: -16776192 -16250872 -16250872 -16250872 -16250872 -16249848 ...

How to run 16 bit code on 32 bit Linux?

柔情痞子 提交于 2019-12-06 14:10:40
I have written a small 16-bit assembly program that writes some values in some memory locations.Is there a way I can test it in 32-bit protected mode on Linux? qemu , dosbox , bochs Yes, 16-bit code is supported in user processes in Linux. The system call to do it is called vm86() (there's a man page, but there's not much in it). It is, naturally, only works on x86 platforms (and 32-bit only). If you want an example, the ELKS project has a complete tool for running ELKS 8086 binaries on Linux, which uses it: https://github.com/lkundrak/dev86/tree/master/elksemu Look for the run_elks() function