<dave0>
tabemann: i ported my multiply and divide functions from amd64 to your arm32
<dave0>
not sure if it would be easy to port to arm64
<tabemann>
nice
<dave0>
it's my first arm assembly code :-)
<tabemann>
actually, I'm using Thumb-2, and sorry to say this, but in Thumb-2 only registers r0-r7 are easy to use, and I've already got registers r6 and r7 allocated
<tabemann>
personally I prefer to use just r0-r3 because these registers are caller-saved
<tabemann>
in the standard ABI
<dave0>
i don't know any calling sequences, i just did what made sense to me
<tabemann>
oh it's a good first ry
<tabemann>
*try
<dave0>
ehehe thanks :-)
<tp>
dave0, nice neat code!
<tp>
dave0, you did that on the webpage assembler/sim ?
<dave0>
tp: yeppers
<dave0>
i don't have any arm emulators or anything so i searched for a web browser thing
<dave0>
it worked out nicely i think!
<tp>
that web page thing has a decent feel about it
<tp>
nice find!
<tabemann>
back
<tabemann>
I probably would have used your code, with modifications of course, were it not for my shamelessly stealing Matthias's code :)
<tp>
dave0, assembly wiz!
<tp>
to is very happy, his delivery of food from the supermarket came today :)
<tp>
to = tp
<tp>
the Australian govt has been saying "Australia produced 3/4 more food than we eat, so no food shortage" but a lot of the more quality items are oddly 'out of stock' on the supermarket website ... hmm
TCZ has quit [Quit: Leaving]
<tp>
maybe the govt actually wrote "Australia produces 3/4 more hardtack biscuits than we eat, so no hardtack biscuits shortage"
<tp>
?
<tabemann>
I'm just annoyed that the grocery stores here are out of the root beer I like
<tp>
it's the little things we miss
<tp>
I managed to but two 1kg bags of frozen Barramundi fish fillets which are really nice, (real fish), and they have been out of stock since I got them
<tp>
but = buy
proteus-dude has joined #forth
proteus-guy has quit [Ping timeout: 240 seconds]
<dave0>
tabemann: i forgot to check for traps in my divide function
<dave0>
divide by zero or oveflow
<dave0>
hmm
Zarutian_HTC| has joined #forth
Zarutian_HTC has quit [Read error: Connection reset by peer]
<tabemann>
the code I'm using doesn't either
<dave0>
tabemann: what do you think? should it check for divide by zero?
<tabemann>
it's extra complexity, and it's an exceptional condition anyways
<dave0>
hmm
<tabemann>
in my code I don't test for div zero, and rather just let the MCU handle a processor exception
tolja has joined #forth
<dave0>
yeah i'm not sure how to raise an exception
<proteus-dude>
until you find yourself in a situation where every cycle counts, division ops should always check for div/0. Saves you a LOT of headaches.
<dave0>
my divide also fails if the quotient doesn't fit in a cell
<tp>
dave0, you don't have to worry, the cpu will detect it and raise a exception all by itself I think
<tp>
dave0, arm cpus raise exceptions for most things I think
<tp>
hmm
<tp>
10 0 / ok. . 0 ok.
<dave0>
heh
<dave0>
gforth catches divide by 0
<tp>
gforth is a monster
<tp>
this is a 29kB Forth
<tp>
20kB
<tp>
35,37 C
<tp>
95,78 F gahh, hurry up ausie winter!
proteus-dude has quit [Ping timeout: 256 seconds]
MrMobius has quit [Read error: Connection reset by peer]
gravicappa has joined #forth
mtsd has joined #forth
xek has joined #forth
dys has joined #forth
<veltas>
Z80 has an exception on divide by zero
<veltas>
It's the "your computer will get stuck in an infinite loop trying to reduce the divisor"
<veltas>
exception
<siraben>
veltas: Haha I was wondering what you were talking about, I don't recall any traps!
<veltas>
Shouldn't have recalled any division lol
<veltas>
Or multiplication
reepca` has joined #forth
reepca has quit [Read error: Connection reset by peer]
reepca` is now known as reepca
rdrop-exit has joined #forth
WickedShell has quit [Remote host closed the connection]
dddddd has joined #forth
<veltas>
Arithmetic is one of the few things I will bite the bullet and implement properly in assembly despite size because I want reasonably fast maths
<tp>
nice!
<veltas>
I want to see what Project Euler answers I can write on my forth to run in under a minute
<tp>
crest, were you thinking of something like this ? file:///home/tp/projects/programming-languages/forth/mecrisp-stellaris/mecrisp-unofficial-doc/_build/html/vocabularies.html#voc-howto-registers