English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Asm / Hardware (https://eab.abime.net/forumdisplay.php?f=112)
-   -   Fast way of getting absolute value (https://eab.abime.net/showthread.php?t=107165)

roondar 31 May 2021 16:33

Quite interesting stuff as usual :great
Kind of makes me wonder why many early processors had no ABS instruction, though.

ross 31 May 2021 16:44

Now is right and nice :great

I don't think it's a problem for buzzybe the limited +/-16384 range, nor the inverted x/y input.

ross 31 May 2021 17:21

Quote:

Originally Posted by roondar (Post 1487885)
Kind of makes me wonder why many early processors had no ABS instruction, though.

Laziness? Or: "I gave you
neg
, use it!".
I could understand for a 'simple' processor (RISC or with PLA or with only state machine/combinational logic), but not for a micro/nano-coded one like the 68k..

So yes, ABS is a missed instruction.

buzzybee 31 May 2021 21:47

Guys, you are amazing. Following this conversation feels almost like a rap battle to me - with all results having their own flavor.

@ross: You are the god of efficient code. Your skills are so inspiring.
@robinsonb5, I can absolutely tolerate the limited range and the inverted result. Just tested your code, works perfectly as a controller of Kraken attack wave animation frames. Will make them look amazing.

robinsonb5 31 May 2021 22:38

Quote:

Originally Posted by buzzybee (Post 1487953)
Guys, you are amazing. Following this conversation feels almost like a rap battle to me - with all results having their own flavor.


LOL - that will probably be the one and only occasion in my entire life when I'm likened to a rapper!


Quote:

@robinsonb5, I can absolutely tolerate the limited range and the inverted result. Just tested your code, works perfectly as a controller of Kraken attack wave animation frames. Will make them look amazing.

Glad to hear it worked out - thanks for a fun puzzle!


All times are GMT +2. The time now is 11:04.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04402 seconds with 11 queries