Might want to share your harness /s
64 karma · joined August 20, 2023
Might want to share your harness /s
Many programs written in assembly language used self modifying code back then. It saved RAM and improved performance. All programs that used such trickery would have broken by a binary translator.
So sad.
Most American post I have seen here since ages.
However!
As soon as you cabled all together their imperfections added up and they started to groove like nothing that has been heard before.
They knew: If Linux makes it in Munich, it will likely spread over and they loose tons of contracts with other German states.
Aren't Quadtrees covered by almost all basic data-structure books? It is the most simple form of taking the binary tree into the next (2D) dimension.
For those who don't know: Vias are not only used to get an electrical connection from one side of the PCB to another.
You also need them to keep radiation in check and often to move heat away.
With this technique, good luck getting through EMC testing for anything but trivial circuits.
this is really bad. It might be a breakthrough of what you are doing, but when I listen to the output all of the timing and phrasing is aweful.
That was a thing back in the 90th..
I wonder how hard the performance hit from moving values between integer and float pipeline is nowadays.
Last time I looked into that was the Cortex-A8 (first I-Phone area). Doing that kind of trick costed around 26 cycles (back and forth) due to pipeline stalls back then.
> 2. Mobile consumer hardware is sufficiently fast for the application > operations (eg. Cryptographic operations)
You are right here. It is possible to emulate a card using mobile phones. We've been able to shim/emulate any card for much longer.
The thing is: To connect to the payment system you need a certificate. And you simply don't get it unless you can prove that you have all kinds of security measures applied.
For android and apple, the actual payment stuff runs inside a isolated little micro-controller which has been certified and is temper proof/protected. This little thing is fortified so far that it will destruct itself when you try to open it up. There are alarm meshes, light sensors and much more inside the chip to detect any intrusion just to protect the certificate.
If you don't have that security, the payment providers will deny you their certificate, plain and simple.
You can build your own thing using card emulation via apps, but you will take all the risks.
How it works in practice is the following: These temper proof micro-controllers can run java-card code. You can write an applet for them, get it installed (if you have the key from apple/google - not easy). Then install it and you have a two-way communication: Your applet inside the secure world communicating with the payment world, and your ordinary mobile app showing things on the screen.
1st: The message overhead during communication is not an issue. It is tiny compared to the time it takes for the credit card to do it's crypto thing.
2nd: This won't be adapted ever. There is simply way to much working infrastructure out there build on the APDU protocol. And there are so many companies and stakeholders involved that doing any change will take years. If they start aligning on a change, it would be something that makes a difference, not something that safes time in the order of 5 to 20 milliseconds. per payment.
Last time I checked, CRC32 worked surprisingly well as a hash.
BSWAP EAX converts from little endian to big endian and vice versa. It was a 32 bit instruction to begin with.
However, we have the 0x66 prefix that switches between 16 and 32 bit mode. If you apply that to BSWAP EAX undefined funky things happen.
On some CPU architectures (Intel vs. AMD) the prefix was just ignored. On others it did something that I call an "inner swap". E.g. in your four bytes that are stored in EAX byte 1 and 2 are swapped.
0x11223344 became 0x11332244.Sure you can mess up your performance by picking bad compiler options, but most of the time you are fine with just default optimizations enabled and let it do it's thing. No need to understand the black magic behind it.
This is only really necessary if you want to squeeze the last bit of performance out of a piece of code. And honestly, how often dies this occur in day to day coding unless you write a video or audio codec?
And every graphic programmer worth it's salt had a copy of "Computer Graphics - Principles and Practice" on the desk and followed whatever came out of the "Graphics Gems" series.
We knew about BSP, Octrees and all that stuff. It was common knowledge.
A common way to implement these is to have an array of messages, sized for the worst case scenario and use this as the message pool.
You keep the unused messages in a single linked "free-list", and keep the used messages in a double linked queue or fifo structure.
That way you get O(1) allocation, de-allocation, enqueue and dequeue operations for your message queue.
Another example for this paradigm are job queues. You might have several actuators or sensors connected to a single interface and want to talk to them. The high level "business" logic enqueues such jobs and an interrupt driven logic works on these jobs in the background, aka interrupts.
And because you only move some pointers around for each of these operations it is perfectly fine to do so in interrupt handlers.
What you really want to avoid is to move kilobytes of data around. That quickly leads to missing other interrupts in time.
I beg to disagree.
In kernels, drivers, and embedded systems they are very common.
Around 2006 I had some automotive entertainment system from NEC on my table which had one of the Bitboys GPU chips on it. Wrote some vector graphics API for it.
It wasn't bad honestly. It supported OpenGL/ES 1.0 I only had to contact them twice for driver bugs. They resolved that within a few days.
There have been mixed memory models and you could go crazy with near and far to break out of the limits of the easy memory models.
Most of the time it was just a mater of picking a suitable memory model for your code and forget about near/far though. Not so different than today.
I browsed a little through the code, and found that sort.com used self-modified to change the sorting order:
; note! jae is patched to a jbe if file is to be sorted in reverse!
;
CODE_PATCH LABEL BYTE
JAE INNER_SORT_LOOP
I committed similar crimes in the 90th as well, but that was just me as a teenager programming stupid games in asm for fun and giggles. Not for commercial software.On ARM M3/M4 you have the same issue with LDRD and STRD instructions which do not allow unaligned access. Even the normal load/stores don't allow unaligned access in all cases. Try this in the peripheral memory region for starters. And things get even more complicated when the memory protection unit shakes up things.