<veltas> Am I misunderstanding UM/MOD or is gforth broken?
<veltas> 2147483648 S>D 2 UM/MOD
<veltas> This should divide/mod by 2, on gforth I get a divide-by-zero
<veltas> My reading of the standard is that this should be legal http://forth-standard.org/standard/core/UMDivMOD
<tp> I get 2147483648 S>D 2 UM/MOD u. 3221225472
<tp> thats using Mecrisp-Stellaris on a 32 bit micro
<veltas> Oh I am making a silly mistake, S>D is of course treating it as a signed number
<veltas> The result actually doesn't fit
<tp> s>d ( n - - d ) Makes a signed single number double length
<veltas> This is an ambiguous situation because 2147483648 is negative with 32-bit integers, and so it becomes a very large unsigned double integer which the result of dividing by 2 does not fit into a single cell
<veltas> I should just replace S>D with 0
<tp> to turn 2147483648 into a double ?
<veltas> Yes
tabemann has joined #forth
<veltas> Given that I want to semantically treat it as an unsigned promotion
<tp> 2147483648 0 2 m/mod u. 1073741824
<tp> m/mod ( d n1 - - n2 n3 ) d / n1 = n3 remainder r2
<tabemann> I'm frustrated by that there appears to be no 64-bit division instruction in thumb-2
<tp> pr`etty sure there is 64 bit result
<tp> but as it's only a 32 bit chip ...
<tabemann> but even x86 (not x86-64) supports 64-bit math (or else you wouldn't be able to use long long under gcc)
<tabemann> and how does mecrisp-stellaris do its 64-bit fixed numbers without support for 64-bit division?
dddddd has quit [Remote host closed the connection]
proteusguy has quit [Ping timeout: 240 seconds]
proteusguy has joined #forth
rdrop-exit has joined #forth
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
<rdrop-exit> c[] good morning forthwrights
iyzsong has joined #forth
<dave0> tabemann: you can do long division with shifts and subtracts, but it's slow
<dave0> it's also a lot of code compared do a simple "div"
<rdrop-exit> even C doesn't provide it, you have to roll your own or use a non-standard compiler intrinsic
jsoft has joined #forth
Croran has quit [Ping timeout: 260 seconds]
Croran has joined #forth
Croran has quit [Ping timeout: 265 seconds]
Croran has joined #forth
<tp> g'day Zen Forth Guru!
actuallybatman has quit [Ping timeout: 272 seconds]
<rdrop-exit> hello Antipodean Master Forth Technician (tm)!
<tp> my forth diagnosic menu now has 3 sub menues and they integrate flawlessly!
<rdrop-exit> kudos
<tp> my simple program has grown into a monster!
<tp> have you had a chance to do any coding or still slumming amid the ash ?
<rdrop-exit> I coded the basic interface to JTAG last night.
<tp> Im glad that the Australian volcanoes are all so old they're worn out, and we have had so much rain that all but 29 fires are out now. Some were burning for 6 months
<rdrop-exit> cool
<tp> excellent, you will have to get a real chip to test it against sometime ?
<rdrop-exit> absolutely, for the moment I'm just going by what it says in the specs, I'm sure reality will be much messier
<tp> this poster is having issues with risc-v jtag
<rdrop-exit> It seems he's having issues with his tools
<rdrop-exit> his last post says that on another computer with different tools it works
<tp> i think he is having jtag issues
<rdrop-exit> (Note: On another computer, with another longan nano, with a jlink 10.1, with embedded studio for RISCV, blinky works).
<tp> I havent used jtag with my GD chip yet, Ive only programmed it via USB bootloader and even that has a mistake in silicon
<tp> yeah, one worked, one didnt, but that may be indicative of GD issues
<tp> the jtag tools world is very stable these days
<tp> my jtag adaptor is circa 2014 and I use it still
<rdrop-exit> It's not just the adaptor, there's also the SW tools that use the adaptor
<tp> in fact I bought 2 units in 2014 from Olimex at about $65 each
<tp> yes, for sure
<tp> and the tool makers will most likely be reading the same docs you are
<rdrop-exit> I won't be using any 3rd party software except the driver/library for the FTDI FT232H chip
<tp> I know
<rdrop-exit> If the GD32VF103 is buggy, I will avoid it
<tp> it's pretty much the only useful risc-v chip around atm afaik
<tp> I have a couple, it's interesting, one can buy the boards but not the individual chips
<tp> and the boards are in the $5 range
<tp> I also received a ESP-vroom board as part of one of the GD boards, and that should run 'punyforth' which looks quite interesting
<tp> at around 200MHz
<rdrop-exit> I'm not familiar with punyforth
<tp> it looks damn good from my pov, but I'm only curious. Its made by an Australian
<rdrop-exit> cool
<tp> and been around a few years now
<tp> but Im not using anything in production that doesnt have the kind of dev support I have for Mecrisp-Stellaris on cortex-m
<rdrop-exit> makes sense
<tp> to me it's *all* about development support
<tp> this is my current diags menu, but it's a 'smart menu' and alters depending on the chip
<tp> -------
<tp> Summary
<tp> -------
<tp> External Markings: STM32F103C8
<tp> Part: STM32F1 series
<tp> Serial Number: $D43BA754
<tp> Flash bytes, declared: 65536
<tp> 128kB Flash present
<rdrop-exit> It would have to be when you rely on someone else's Forth.
<tp> even tho it's serial, at 460800 bps the menu appears slmost instantly
<rdrop-exit> cool
<tp> and someone elses chips ;-)
<tp> and someone elses soldering iron ...
<tp> well it's my iron, but designed and built by someone else
<rdrop-exit> sure
<tp> i have finally done up the schematic info I needed to try the GD32VF jtag myself, all I need now is to hook up a olimex unit to it and see if it works
<rdrop-exit> cool
_whitelogger has joined #forth
pierpal has joined #forth
gravicappa has joined #forth
X-Scale` has joined #forth
X-Scale has quit [Ping timeout: 272 seconds]
X-Scale` is now known as X-Scale
mtsd has joined #forth
Croran has quit [Ping timeout: 240 seconds]
Croran has joined #forth
dys has joined #forth
WickedShell has quit [Remote host closed the connection]
xek has joined #forth
rdrop-exit has quit [Ping timeout: 240 seconds]
rdrop-exit has joined #forth
jimt[m] has joined #forth
<tp> rdrop-exit, ping! with Mecrisp-Stellaris I can print adjacent strings with no spaces between them, but if I print the stack there seems to be a space after it, is that default behaviour ?
<tp> rdrop-exit, for instance Im trying to print a filename where the name is calculated, followed by a extension, but there is a space between the name and the extension when I print them extension
<tp> i.e. "$D43BA754 .XML"
nonlinear[m] has joined #forth
siraben has joined #forth
<rdrop-exit> the default behavior of . is to print a space after the number, some Forths have a variant of . that omits the final space, I call it .' in my Forths.
<tp> aha!
<tp> thanks, you have thought of everything :)
<rdrop-exit> Some Forths also have a variant of . that returns an address and length, I call that (.) in my Forth.
<rdrop-exit> I have no idea what Mecrisp calls their equivalents
<tp> I guess an address and length may be a workaround for me
<rdrop-exit> See if he lists a bunch of variant . words somewhere in his docs
<rdrop-exit> gotta go, Valentines Day here, catch you tomorrow :)
rdrop-exit has quit [Quit: Lost terminal]
<tp> Mecrisp-Stellaris only has a "." but also has type ( c-addr length - - ) Prints a string.
<tp> cya and thanks!
rdrop-exit has joined #forth
<rdrop-exit> I forgot to mention, you can always use <# #> and the other related number formatting words to construct whatever custom format you may need
<rdrop-exit> really got to go this time, ciao :)
rdrop-exit has quit [Client Quit]
<tp> which is exactly what I did :)
<tp> thanks again :)
<tp> Save this data as filename: $D43BA754.XML :)
pierpal has quit [Quit: Poof]
pierpal has joined #forth
X-Scale has quit [Ping timeout: 260 seconds]
X-Scale` has joined #forth
X-Scale` is now known as X-Scale
dddddd has joined #forth
pierpal has quit [Read error: Connection reset by peer]
smokeink has joined #forth
iyzsong has quit [Quit: ZNC 1.7.1 - https://znc.in]
smokeink has quit [Ping timeout: 240 seconds]
pierpal has joined #forth
pierpal has quit [Ping timeout: 260 seconds]
dave0 has quit [Quit: dave's not here]
mtsd has quit [Quit: Leaving]
turnandrun has joined #forth
tabemann has quit [Ping timeout: 240 seconds]
dddddd has quit [Ping timeout: 260 seconds]
smokeink has joined #forth
xek has quit [Ping timeout: 246 seconds]
dys has quit [Ping timeout: 248 seconds]
jsoft has quit [Ping timeout: 268 seconds]
dddddd has joined #forth
pierpal has joined #forth
X-Scale` has joined #forth
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
pierpal has quit [Ping timeout: 265 seconds]
WickedShell has joined #forth
smokeink has quit [Remote host closed the connection]
smokeink has joined #forth
smokeink has quit [Client Quit]
pierpal has joined #forth
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #forth
pierpal has quit [Ping timeout: 240 seconds]
xek has joined #forth
gravicappa has quit [Ping timeout: 272 seconds]
djinni has quit [Quit: Leaving]
xek has quit [Ping timeout: 240 seconds]
xek has joined #forth
djinni has joined #forth
MrMobius has quit [Read error: Connection reset by peer]
xek has quit [Ping timeout: 240 seconds]
cheater has quit [Ping timeout: 260 seconds]
cheater has joined #forth
pierpal has joined #forth
pierpal has quit [Ping timeout: 260 seconds]
MrMobius has joined #forth