This code was defined by a third party software company,
and may mean different things for different software.
Contact the software author for more information about this error.
The standard (low-cost) way to program ARM microcontrollers is using Eclipse with a complex toolchain plugged into it. Eclipse has definitely its merits, but I'd like to feel independent from this IDE. I'd like to discover what happens behind the scenes when I build (compile - link - flash) my [...] read more
There is an existing question "Average of 3 long integers" that is specifically concerned with the efficient computation of the average of three signed integers. The use of unsigned integers however allows for additional optimizations not applicable to the scenario covered in the previous question. This question is about the [...] read more
In C, what is the most efficient way to convert a string of hex digits into a binary unsigned int or unsigned long? For example, if I have 0xFFFFFFFE, I want an int with the base10 value 4294967294. read more
In my OpenGL rendering engine I'm currently crashing 1 frame after I press a key that starts issuing some new OpenGL calls. The following is the crashed call stack, which is a CVDisplayLink thread. 0 libsystem_kernel.dylib 0x00007fff94d89f06 __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff88d3e4ec pthread_kill + 90 2 libsystem_c.dylib 0x00007fff980246e7 abort [...] read more
I am working on code that includes bllipparser Python module, among other things. Feeding it the same dataset, it will intermittently crash (maybe once in three to ten runs). Going through lldb, I found that the public field weights of RerankerModel (source), that is apparently only set once (in the [...] read more
I have been measuring clock cycle count on the cortex m4 and would now like to do it on the cortex m7. The board I use is STM32F746ZG. For the m4 everything worked with: volatile unsigned int *DWT_CYCCNT; volatile unsigned int *DWT_CONTROL; volatile unsigned int *SCB_DEMCR; void reset_cnt(){ DWT_CYCCNT = [...] read more
I working on a little app where i want the phone to play a sound file on an event from my location controller. The problem is when the App is in Background mode the AVAudioPlayer not start the Audio file but the code is scheduled, getting NSLog output. Another thing [...] read more
I've just stumbled upon this thing, and I'm really curious if maybe modern CPUs (current ones, maybe mobile ones as well (embedded)) don't actually have a branching cost in the situation below. 1.Let's say we have this: x += a; // let's assume they are both declared earlier as simple [...] read more
I can THINK of why this wouldn't work, but I don't understand why many of the workarounds I've tried don't work. Below is an example of the code I'm trying to make work. The intent should be obvious, but compiling with GCC 7.4.0 for Windows 32 bit, Visual C 32 [...] read more
Upon writing an answer to this question: Using variable vs. using number I ran clang x86 9.0.0/trunk with -O3 to see if it could do tail-call optimization of this simple code: int faculty1 (const unsigned int n) { return n == 1 ? n : n * faculty1(n - 1); [...] read more
This is my first post, so bear with me. I'm trying to play raw h264 video onto a Surface object in an android app. I'm using android 5.0.1 on an HTC one. After reading through the android docs, I've found that I need to use a MediaCodec object to decode [...] read more
I am developing a toy OS in assembly and I have a problem when switching from protected mode back to real mode. I have successfully switched to protected mode, called the kernel that writes text to [0xb8000] video memory, returned to the caller and (probably) switched back to real mode. [...] read more
I can only use the bitwise operators mentioned below to create the described function: /* * allEvenBits - return 1 if all even-numbered bits in word set to 1 * Examples allEvenBits(0xFFFFFFFE) = 0, allEvenBits(0x55555555) = 1 * Legal ops: ! ~ & ^ | + << >> * Max [...] read more
I've recently ported to a different hosting company (VDS), and on the new server, installed IIS 7.5 Express, latest versions of PHP and MySQL. I then copied the files from the old server to new server (NOTHING beyond the content of the folders of my websites, so no config files [...] read more
I'm triyng to create an epub reader for android, so after a lot of searching I found skyepub library (SDK) . seems it have all features i want. i followed the tut in the site, but after running the code i got a blank screen and different logcat for different [...] read more
We've got an legacy CRM system (Server), that uses a mapped network drive. The problem is drive is fully opened for modification by any users. I'm trying to use user impersonation, in c# .net console application (Client A). 1. Client A execute an .exe program (console application), that makes impersonation [...] read more
I am trying to create a bridged WiFi hotspot on a Centos 8 system, using NetworkManager. The machine is Dell EPC3000, with two built-it GigE's and ath10k wireless adapter, plus an LTE WWAN. Creating a NATted hotspot works nicely: nmcli con add type wifi ifname wlp4s0 con-name wlp4s0 autoconnect yes [...] read more
#include <stdio.h> int main() { int a = -2; // 0xFFFFFFFE unsigned int b = 1; // 0x00000001 if ((int)a > (int)b) printf("(int)a > (int)b;\n"); else printf("(int)a < (int)b;\n"); if ((unsigned int)a > (unsigned int)b) printf("(unsigned int)a > (unsigned int)b;\n"); else printf("(unsigned int)a < (unsigned int)b;\n"); if (a > b) [...] read more
In this header file, I am getting error: unknown type name uint32, uint16. I am new to Objective-C and I am trying to import a project in Xcode. Build is failing due to the above issues. Google didn't help.Tried adding /stdint/stdint.h in header search path ( xcode unknown type name, [...] read more
When doing a math operation, how can I get the part that overflowed? For example, assuming 32-bit ints: unsigned int a = 0Xffffffff; unsigned int b = 0xffffffff; unsigned int c = a + b; In this case, c is 0xfffffffe, but the answer should be 0x1fffffffe. How do I [...] read more
I recently bought an STM32F7 discovery board [1], and I am therefore trying to flash it using openocd, since the board has an embedded st-link debugger. I have my toolchain working (I am using makefiles and arm-none-eabi-gcc), but I would like to flash the board using eclipse so I can [...] read more
I have an IIS6 machine, running multiple web applications. Once in a while, IIS recycles W3WP. When i look at the error codes, W3WP.exe usually exits with return code -2 (0xfffffffe) but one in a while it exits with -3 (0xfffffffd). While the end result is the same, i was [...] read more
I am working on some Tensilica processor and I don't understand the normalization process. NSA - Normalized Shift Amount Usage: NSA at, as NSA calculates the left shift amount that will normalize the twos complement contents of address register as and writes this amount (in the range 0 to 31) [...] read more
tl;dr: flashed firmware to 0x00000000 instead of 0x08000000, am I lost? Hello, my device is based on a STM32F103CBTx which came with a proprietary firmware and had readout protection on. I connect to it with a ST-Link v2 SWDIO and SWCLK connected to PA13 and PA14 and this command: sudo [...] read more
I have tried different versions of nnlibs at codeaurora and used SDK 3.0, 3.2 and 3.3.3 to compile and test them. The closest I got was to use the commit version 7321d49318a33a99e978b18411adee43df7ddaea (Jan 2018) with SDK 3.3.3 and while running the graph_app I receive this helper: $ adb shell /data/graph_app [...] read more
I have worked out a toy hypervisor with VMX in Linux, and it can work well with my testing VM. Now I am trying to test suspend and resume my testing VM with my toy hypervisor. I did followings to suspend the VM. The VM starts in real-mode, and then [...] read more
I need a random number generator with high performance that is used for Monte Carlo calculation on particle transport. The requirements are: 1. Independently generated by each thread 2. The period of the generator should be larger than 2^40 I have tried Tausworthe generator(mathematics of computation, 65, 213 (1996), 203-213), [...] read more
Does anyone knows why I'm getting this error (not every time but sometimes) when trying to start one console application from another. Error: > System.ComponentModel.Win32Exception (0x80004005): Unknown error (0xfffffffe) > at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo > startInfo) at System.Diagnostics.Process.Start() this is my Code: System.Diagnostics.Process myProc = new System.Diagnostics.Process(); try { myProc.StartInfo.FileName = @"C:\MyFolder\MyExecutableApplication.exe"; [...] read more
I'm writing a simple code in C (only using bit-wise operators) that takes a pointer to an unsigned integer x and flips the bit at the nth position n in the binary notation of the integer. The function is declared as follows: int flip_bit (unsigned * x, unsigned n); It [...] read more
I've been working on code to attempt to monitor for stack traces and had the idea to try to use debug registers and vectored exception handling (for x86). I've made an example program that will output the address of whatever accesses the current return address. This works if a stack [...] read more
I am developing an application that needs to run a batch file with administrator privileges from a normal person account. It all works fine when I am logged on to the computers administrator account but not in the "test account" without admin privileges. I do get all the information required [...] read more
I am about to do some data processing in C, and the processing part is working logically, but I am having a strange file problem. I conveniently have 32-bits of numbers to consider, so I need a file of 32-bits of 0s, and then I will change the 0 to [...] read more
I am creating an operating system since this summer, it is an 32 bits operating system which work in protected mode. I need to creat a way to make BIOS interrupt so I need to pass in real mode and before in 16bit, I sucessfully pass to 16 bit but [...] read more
So some background - I have a esp32 cam with a PIR sensor. The esp is in deep sleep, then is waken up by a PIR sensor (GPIO 13) and the esp takes an image. What I want it to do is then monitor for another 15s for movement. If [...] read more
I'm trying to get a basic PoC app running with MassTransit using our Amazon MQ instance, and running into the following problem when I call StartAsync on IBusControl: MassTransit.ActiveMqTransport.ActiveMqConnectException: Connection exception: (user)@(host) ---> Apache.NMS.NMSConnectionException: Error connecting to (host) ---> System.Net.Sockets.SocketException (0xFFFFFFFE): Unknown error (0xfffffffe) at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.DoConnect(String host, Int32 port, String [...] read more
I have following code to showcase stack-based buffer overflow. int check_authentication(char *password) { int auth_flag = 0; char password_buffer[16]; strcpy(password_buffer, password); if(strcmp(password_buffer, "Admin") == 0) auth_flag = 1; return auth_flag; } Here when user inputs any string with length greater than 16 will allow access. To show other case of [...] read more
Found this code, it needed to stop throttling the CPU to 20% in Dell laptops, which occurs due to the power adapter failing to be recognized by the computer. Tried to compile on Kubuntu and got this: warning: implicit declaration of function ‘asprintf’; did you mean ‘vasprintf’? [-Wimplicit-function-declaration] 47 | [...] read more
I am currently using OpenOCD to debug Cortex-M33 processor. However, after it connects to gdb and starts debugging, it shows the following message: Try to search windows process Found openocd running, Kill it SUCCESS: The process "openocd.exe" with PID 18768 has been terminated. Open On-Chip Debugger 0.10.0 Licensed under GNU [...] read more
I'm using the J-Link EDU and STLink debugger present on the Nucleo boards from ST. For testing, the bootloader code is present at 0x8000000 and just jumps to 0x8020000 where the main app code is present. When I use the Jlink EDU, it can't program the flash at 0x8020000 every [...] read more
If the CPU treats the subtraction as add like this question. Then (-1) - (-2) should be FF...FF + 00...02, and the CARRY FLAG should be set. I wrote c code to test (-1) - (-2) on linux, but found the CARRY FLAG was not set. How CPU deal with [...] read more
I am currently trying to use a bootloader application created using MCUXPresso that requires that my application start address is located at 0x80000. According to the following documentation: enter image description here [https://i.stack.imgur.com/yTwDO.png] However, the .bin I generate is created with Kinetis Design Studio (an earlier version of MCUXpresso) and [...] read more
Why does this code cause hard fault and jumps into infinite loop? #include <stdint.h> #include <math.h> void myfunc() { const double val = 1; double log_res = log2(val); // <----- THIS CAUSES A FAULT //double log_res = log2(1); // This works } When I replace val in the evil line [...] read more
I've got some issues flashing firmware using an STLINKv2 (from a Nucleo board) with an nRF52 target device using SWD. In short, I'm able to "connect" to the nRF52 (I can open a telnet session), but as soon as I try a Program command, I get a non-helpful error (below). [...] read more
When debugging the program works how it's supposed to. When running the release version, it tells me I have not enough space. Why is this happening and how can I make it run in the release exe? I found some other article, but I don't get where the similarities are. [...] read more
C# Impersonate Error Hello, wanted to create an application that would give me privileges to install applications with an user that has such accesses. It's important that the user with elevated privileges would be log onto from inside the application and thats what i've been trying to do but it [...] read more
I was playing with Tail Call Optimization (TCO) and various optimization levels in clang on godbolt. I have the very simple function (lifted from here): int factorial (int x, int y){ if (x==0) return y; else return factorial(x-1,y*x); } If I set -O1, all is good and I understand the [...] read more
QUESTION How would I change the least significant bit to 0 without affecting the rest of the value, for example: 0xffffffff , for example in C or Python? I am not a mathematical genius, so for me it's a hassle to find out how to achieve this. SOLUTION n = [...] read more
I am trying to use Eclipse with J-Link on an ATMEL ATSAME70Q21. I am able to debug code perfectly when the code start address is at the default address of 0x00400000. It downloads the code, stops at the main breakpoint, etc. All the debug commands seem to work fine. When [...] read more
I've been working with bits in C (running on ubuntu). In using two different ways to right shift an integer, I got oddly different outputs: #include <stdio.h> int main(){ int x = 0xfffffffe; int a = x >> 16; int b = 0xfffffffe >> 16; printf("%X\n%X\n", a, b); return 0; [...] read more
HeifEncoder was seen and implemented. "MediaCodec.createEncoderByType(MediaFormat.MIMETYPE_IMAGE_ANDROID_HEIC);" If you do this, the following error will occur. > Blockquote java.lang.IllegalArgumentException: Failed to initialize image/vnd.android.heic, error 0xfffffffe at android.media.MediaCodec.native_setup(Native Method) at android.media.MediaCodec.<init>(MediaCodec.java:1811) at android.media.MediaCodec.createEncoderByType(MediaCodec.java:1777) Is there a way to resolve the error? read more
I am using redis server 3.0.6 on ubuntu 16.04 desktop. Installed using apt-get install redis-server It was working fine for a long time. Today, when I tried to import a rcmd file using unix socket in redis-cli I am getting out of memory error. $ sudo redis-cli -s /run/redis/redis.sock < [...] read more
I'm currently working to create a function which accepts two 4 byte unsigned integers, and returns an 8 byte unsigned long. I've tried to base my work off of the methods depicted by this research but all my attempts have been unsuccessful. The specific inputs I am working with are: [...] read more
I'm developing a DICOM application with dcm4che3, however, I have a problem with multiframe DICOM file. I would like to convert several JPEG images in only one DICOM file (Multiframe DICOm file. I have extracted all the frames from dicom as Jpeg images and masked. I want to set back [...] read more
I want to use usb wifi adapter in custom android board, so far I was able to build driver for chipset, and android is able to detect the dongle, and even creates wlan0. But I don't how to load firmware as there is one bin file. When I am trying [...] read more
In my project, > boot loader Flash address: 0x08000000 > > application Flash address: 0x08004000 > > Same RAM for boot and app: 0x20000000(IRAM1) and 0x10000000(IRAM2) 1. Separately boot Loader and Application(With or Without FreeRTOS) working fine. 2. Boot Loader and application(Without FreeRTOS) working perfectly. 3. But if i use [...] read more
The goal is to get the full path to the document opened in an instance of Microsoft Word that I have a process reference for. Pseudocode Example: Process myWordProcess = something; // This is my process reference DocumentInformation docInfo = SomeNamespace.GetDocumentInformation(myWordProcess); string documentPath = docInfo.FullName; // "C:\User\Foo\Documents\Test.docx" The starting point [...] read more
In C, the index of an array of char can range from 0 to 2 ^ (sizeof(size_t) * CHAR_BITS), but the count of the array's members, is that number plus 1, which can't be hold by a size_t variable. For example, in x86, if sizeof(size_t) is 4, then the index [...] read more
I want to threads has some local variable, with thread.Thread it can be done like this elegantly: class TTT(threading.Thread): def __init__(self, lines, ip, port): threading.Thread.__init__(self) self._lines = lines; self._sock = initsock(ip, port) self._sts = 0 self._cts = 0 def run(self): for line in self._lines: query = genquery(line) length = len(query) [...] read more
I've been trying to figure out how to make some sense of a dumped XML layout, and it's progressing 'pretty good'. The only thing I'm currently unsure about is the following: When I use the command: aapt dump xmltree <pathofapk> <pathofxmlfile> I get the following result: N: android=http://schemas.android.com/apk/res/android E: LinearLayout [...] read more
I'm attempting to run a compiled program on a ARM Cortex-M3 bare metal. Before the system even reaches the application code, an odd error blows the program counter away and errors out. Before the instruction, the registers are observed to be: r0 0x0 0 r1 0x1 1 r2 0x0 0 [...] read more
I have two programs, one is custom bootloader which will be located in BANK A and the other one is the main program which will be located in external spifi flash. Both programs I load and debug from eclipse. Currently I can jump from the bootloader to the main program, [...] read more
I want to copy a function from Flash to RAM and RUN it. I know that IAR includes the __ramfunc type for functions that allows you to define a function in RAM but i dont want to use it for 2 reasons: * RAM funcs are using RAM memory that [...] read more
I heard that with a jmp -2 we could make an infinite loop. It sounded weird but after the explanation that a relative jump would take one byte, the next instruction address (eip) would be 2 bytes less than the jmp address. So, I decided to implement that but I [...] read more
I am trying to run an exe from another account which has admin rights, I have this so far but its giving me an unknown error (0xfffffffe): Private Shared Function ShowWindow(ByVal hwnd As IntPtr, ByVal nCmdShow As Int32) As Boolean End Function Public Sub RunAsAdmin() Dim tokenHandle As New IntPtr(0) [...] read more
Ive been asked to write a function that merges two sorted (ascii sorted) strings without duplicates. For example, for string1 = aabcd, and string2 = abbcdg, the end result string should be abcdg. For some reason, the end result string doesnt allocate well, or so I think.. its not working [...] read more
I have an issue regarding barebox bootchooser/state integration for Raspberry Pi 3 (used for multiple rootfs + RAUC software update). I am using the following: Yocto Pyro 2.3.2, barebox 2018.12.0 . I have successfully configured barebox, I can see the output on the debug console. Rpi 3 does not have [...] read more
I have a folder on C:\, let's say C:\ABC, shared as a network folder as R:\ with full access (to this directory and all its contents) to all users. (Win2008R2) Inside the folder I have one specific dir which I have made a site of in IIS7 (functioning well). In [...] read more
I've got a server and that uses the i915 integrated graphics chip from Intel error The error is: [ 3.015087] AES CTR mode by8 optimization enabled [ 3.029401] iwlwifi 0000:05:00.0: base HW address: f8:94:c2:c1:56:97 [ 3.065668] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs' [ 3.065847] (NULL device ): hwmon_device_register() is [...] read more
I would just like some heads up on this as I really don't understand -why- this is the case. Further down is the TCPDUMP output (tcpdump -s0 -XXnni eth0 tcp port 80) of the 'HTTP' response a webserver gives when a normal GET request is made to it. What I [...] read more
I am trying to apply a type of side channel attack I read about in this paper that tries to infer execution state from differences in IRQ latencies on a MCU with a cortex M4 processor. The attack carefully interrupts instructions that occur right after a branch and measures the [...] read more
I am currently learning about PMP in RISC-V, I understand about the TOR, but I'm getting difficulties to understand NA4 and NAPOT configuration enter image description here [https://i.stack.imgur.com/obe5w.png] Can someone make an explanation ? My assumption is, if my pmpaddr is 0xFFFFFFFE then it means my pmp ranges from 0xFFFFFFFE00 [...] read more
So I have written a function for my ESP32 using the Arduino IDE, and I needed to write a function to take a combined string of hex values like this: ffffff0000ffff0000 And split it into an array, like this: {"ffffff","0000ff","ff0000"} So far, I've written this: String colorIndex[] = {}; void [...] read more
I recently stumbled at an error which is present only in Python. Negating unsigned 1 does not equal FFFFFFFF. In Assembler: MOV(eax, 0x1) NEG(eax) > Result is 0xffffffff Same result in C++ In Python however: import numpy as np print(hex(~np.uint32(1))) > Result is 0xfffffffe What am I missing here? read more
I'd like to do a jump to bootloader from application on STM32 Blue Pill STM32F103C8T6. My approach looks that: - Write to BKP->DR1 any value; - Do a reset (NVIC_SystemReset()); - A the beginning of main, check if BKP->DR1 != 0, than set it to 0 and jump to boot; [...] read more
I have the following TabBar (I've used flexibleSpace to remove the padding an empty AppBar would put above the TabBar and SafeArea such that the TabBar doesn't appear under the android status bar): home: DefaultTabController( length: 3, child: Scaffold( appBar: AppBar( flexibleSpace: SafeArea( child: Column( mainAxisAlignment: MainAxisAlignment.end, children: [ TabBar( [...] read more
I made an electronics project based on stm32f303cbt6. I generated a sample code using cubemx. Now I'm trying to run it on MCU, but I can't flash it. I use STlink v2. SW4STM32 tells me: > Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-12-08:33) Licensed > under GNU GPL v2 For bug reports, [...] read more
I am developing a code for a real-time DSP and I need the experts' feedback on part of the code that uses the method mentioned in "Answer 3 to the post Inverse sqrt for fixed point" to implement 1/sqrt(uint). The code is being developed for a TMS320C6455 DSP. Thus, the [...] read more
Currently working with UDP socket, I am stucked trying to understand the following situation. A reception buffer has been defined as follow: char buf[1024]; ... memset(&buf, 0, sizeof(buf)); & is fullfilled by invoking recvfrom() size = recvfrom(sockdf, buf, sizeof(buf), MSG_WAITALL, (struct sockaddr *) &rx, (socklen_t *)&len); I am getting these [...] read more
I am writing a simple program that reads data from two files and performs a byte-by-byte comparison to find the first(if any) difference between the two. Here is the code I'm having trouble with: it checks to see if the lengths of the files are different and prints appropriately: len1 [...] read more
Based on my (self-answered) question here Muxing AVPackets into mp4 file - revisited, I have to ask, what could be the reason why there are no values written for pts/dts in the resulting mp4 container. I examined the container file with the tool MediaInfo. I observe that only the very [...] read more
I'm trying to make a buffer overflow on a c program, but I can't manage to find the vulnerability and exploit the code. I've tried thousands of inputs. Generally I've tried these: 1) I've tried the obvious - giving a very long string as an input. 2) I've tried to [...] read more
I want to make a nodeMCU IoT project with Pushbullet push service. There are a lot of the same project examples that I'm trying to make. My project is almost same with a below example. nodemcu-pushbullet-notification It seems very simple, but I'm experiencing unexpected difficulties. HTTPS handshake fail with error [...] read more
In the following code after calling 'access' system call, 0xfffffffe is present in EAX. While in case of success, 'access' system call returns 0. Here I am trying to access the memory which is part of the data section. Then why 'access' is returning 0xfffffffe ? global _start section .text [...] read more
I'm currently working on the binary bomb project and am stuck on phase 5. My version appears to be a little different than the other walkthroughs and tutorials I've searched for. This is x86-64 assembly. I've figured out that it is looking for two integers as input. Here is the [...] read more
I am new to C# and I need to use a class I had previously in PHP but now I have it in C++, the problem is that I do not know how to transform it to C# in the correct way, I have been trying but I do not [...] read more
STM32F767ZIT6 Nucleo board and trying to flash it with blinky code from templates * have populated all the CMSIS and required drivers. * Installed GNU MCU eclipse plugin. * Built the code * Configured openOCD * When trying to debug the code its returns these errors GNU MCU Eclipse 64-bits [...] read more
I have a BizTalk 2013r2 Standard Edition application server with a dedicated (Separate Sql Server) hosting the BizTalk databases. Just lately, I've started to see a pair of errors in the event log. Typically these are raised about every couple of hour but there's no clear pattern - sometimes they [...] read more
I am needing to jump to a very specific place in memory and in order to do this, I am needing to know how the GCC assembler puts .long into the final binary file. .section ".flashconfig" .long 0xFFFFFFFF .long 0xFFFFFFFF .long 0xFFFFFFFF .long 0xFFFFFFFE Which for my layout file, section [...] read more
I'm programming a JIT compiler, that has to call c++ functions from the compiled asm code. I'm working on Windows x64 only so far and implemented the calling convention from microsoft. (https://msdn.microsoft.com/en-us/library/ms235286.aspx) It works, until it doesn't. If the called function is simple and only calls functions that are simple [...] read more
I'm trying to implement an example from a book of calling an assembly function from C. But I keep getting a fatal error where the PC = fffffffe and therefore executing code outside of RAM or ROM. Here is my C file, t.c: int g; // uninitialized global int main() [...] read more
So I'm using an LPC1768 using the mbed interface. This snippet: int16_t test = -1; test -= 1; printf("Value: %d\n", sizeof(test)); if (test== 0xFFFE) { printf("It's stayed the same.\n"); } else if (test== 0xFFFFFFFE) { printf("It's been extended.\n"); } else { printf("None\n"); } prints out Value: 2 It's been extended. [...] read more
I'm trying to do bit logic manipulation in C but getting stuck. I need to write a function that, given an input argument it will evaluate if my argument has all even bits set to 1. For example: myFunction (0xFFFFFFFE) = 0; myFunction (0x55555555) = 1; The operators that I'm [...] read more
I'm finding myself unable to read the zero flag (ZF) bit correctly. I'm quite confused, because this approach appears to work fine for other flags such as the carry flag (CF) or overflow flag (OF). My strategy is to push the EFLAGS register onto the stack with the instruction pushf, [...] read more
I would you like write a simple program that open a binary file and read every byte. I try to do this using an Android device with this syscalls (https://android.googlesource.com/platform/bionic/+/cd58770/libc/SYSCALLS.TXT) with follow code ... ldr r0, =binaryfile mov r1, #2 mov r7, #5 svc #0 loop: ldr r0,=Handle ldr r0,[r0] [...] read more
What is by default type of integral literal defined below: 0X123 /* hex , int ? unsigned int? long? unsigned long? */ 0XFFFFFFFE /* hex , value is (2^32-2)=4294967294 .*/ 0123 /*octal */ /* value = 83*/ 042747672777 /* octal , greater than 2^32*/ /* value=4691293695 */ I read in [...] read more
I´m trying to implement a Sobel algorithm for edge-detection for a YUV camera stream. Initially it seems quite easy but I´m not sure if this approach is correct: * I´m applying the filter just to the Y pixel component and doing U and V = 0 (black and white image). [...] read more
I want to run an elevated command prompt process. I have users: myDomain\myAdmin and myDomain\myUser. If I run next code under myDomain\myAdmin, it works fine. But under myDomain\myUser, next exception appear: "Unknown error (0xfffffffe)". Any ideas why? namespace myProcess { public partial class Form1 : Form { [DllImport("advapi32.dll", SetLastError = [...] read more
I tried to write own simple bootloader, I had this code: .code16 # Generate 16 bit code .globl set_protected_mode .globl set_real_mode __init: call set_protected_mode call set_real_mode jmp __init # jmp init # Jump to init function in init.c set_real_mode: cli mov %cr0, %eax and $0xfffffffe,%eax mov %eax, %cr0 sti jmp [...] read more
I have a shared memory array initialized as follows #define UNDEFINED 0xffffffff #define DEFINED 0xfffffffe __shared__ unsigned int array[100]; __shared__ count; // We have enough threads: blockDim.x > 100 array[threadIdx.x] = UNDEFINED; // Initialize count if (threadIdx.x == 0) count = 0; The threads have random access to array. When [...] read more
I am trying to write a bot for a game, with a DLL Injection. I have found a static pointer to an address I want to read from the DLL. The static pointer's address is wow64cpu.dll+4738, which I get with cheat engine by: 1. Finding the value (z coordinate of [...] read more
I'm facing a weird issue, somewhat similar to this. I have a Windows Phone 8 native DLL project, mostly C++ but with an ARM assembly source in it. The source is in ARM mode (i. e. not Thumb). C++ is compiled to Thumb. The app crashes when C++ tries to [...] read more
I am creating an OS, and I need to call the BIOS in real mode, I tried this code but it has a bug: enter image description here [https://i.stack.imgur.com/8yKZH.png] The error on boch is 00002172825e[CPU0 ] check_cs: conforming code seg descriptor dpl > cpl The code is : global go16 [...] read more
Code::Blocks, Win7, C++ Hi, I'm creating an overview project for myself, and an integral part includes doing an Exchange Sort in descending order. I've created a simple trial run to test the concept. Embarrassingly enough, I can't get past creating the array without the project crashing. This only happens when [...] read more