BBC BASIC 3D 10 PRINT - Crunch 2

  Рет қаралды 608

Least Significant Byte

Least Significant Byte

Күн бұрын

Another 7 bytes bite the dust.

Пікірлер: 11
@byteforever7829
@byteforever7829 Жыл бұрын
Neat code. Are you aware BBC BASIC has an inline assembly keyword I bet you would save ram and speed it up using that.
@GeorgeFoot
@GeorgeFoot Жыл бұрын
SGNPOS ought to work instead of (POS>0) saving 3 characters. Are the brackets after RND optional as well? They usually are for single argument things.
@lsbyte
@lsbyte Жыл бұрын
You need the brackets after RND (unless you only want a floating number between 0 and 0.999 but you might be able to tweak that). SGNPOS looks promising but it yields 0 and 1 not 0 and -1 and so there's need to be further tweakage. I'll have a think about that in the departure lounge!
@lsbyte
@lsbyte Жыл бұрын
Yep, good move - that saves three bytes: B=B*(1-2*SGNPOS)
@GeorgeFoot
@GeorgeFoot Жыл бұрын
@@lsbyte now I wonder about B=BEORSGNPOS with 128* elsewhere. Or maybe B=128ANDB-SGNPOS with B=0 initially - so I think B would then swap between 0 and 128?
@lsbyte
@lsbyte Жыл бұрын
B=128ANDB-SGNPOS and then COLOUR130-B:COLOURZ*2+B-1 saves three more bytes.
@GeorgeFoot
@GeorgeFoot Жыл бұрын
@@lsbyte I think VDU 15,31 can be combined in decimal to save a byte. Now the thing I've been meaning to think about is that you don't need to go up to 128 to change the background colour - you can just go negative instead. Leaving B as-is, you should be able to change COLOUR130-B to COLOUR-2-B without affecting the output. And, maybe that pesky leading "-" can be removed if we also invert the other COLOUR statement, e.g. COLOUR2-B:COLOURZ*2+B-5 or something like that. Or does that change the output? I'm not sure. And, with this negative trick, perhaps we no longer need B to toggle up and down 128 at a time - can we make it toggle just enough to switch from negative to positive? e.g. 8 ought to be enough? It might require more changes to the calculations to get that to work, there are so many things layered in there now it's hard to keep track of!
@qo92
@qo92 Жыл бұрын
Change mode with a VDU?
@Wobblybob2004
@Wobblybob2004 Жыл бұрын
Single digit line number?
@lsbyte
@lsbyte Жыл бұрын
All stored as two bytes regardless of value!
6502 3D 10 PRINT using the BBC BASIC assembler
36:32
Least Significant Byte
Рет қаралды 4 М.
Integra B for the BBC Micro
16:39
Least Significant Byte
Рет қаралды 8 М.
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 63 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 81 МЛН
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 34 МЛН
Женская драка в Кызылорде
00:53
AIRAN
Рет қаралды 483 М.
BBC BASIC 3D 10 PRINT - The Crunching
8:59
Least Significant Byte
Рет қаралды 996
RISC-V 3D 10 PRINT using the BBC BASIC assembler
19:30
Least Significant Byte
Рет қаралды 541
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 806 М.
BBC BASIC 3D 10 PRINT
14:11
Least Significant Byte
Рет қаралды 5 М.
Acorn Electron AP6 2V2 Plus 1 expansion
9:26
Least Significant Byte
Рет қаралды 3,5 М.
Commodore 128DCR c0pperdragon + RGBtoHDMI
15:27
Least Significant Byte
Рет қаралды 7 М.
ZX81 Composite Video and RGBtoHDMI Adjustments
23:03
Least Significant Byte
Рет қаралды 902
Games That Push the Limits of the ZX81
17:58
Sharopolis
Рет қаралды 117 М.
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 521 М.
НОВЫЕ ФЕЙК iPHONE 🤯 #iphone
0:37
ALSER kz
Рет қаралды 310 М.
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Tynalieff Shorts
Рет қаралды 2 МЛН