00:00:00 --- log: started forth/09.01.19 00:16:38 --- quit: ygrek_ (Remote closed the connection) 01:26:02 --- quit: aguai ("leaving") 01:32:54 --- quit: KipIngram (Read error: 60 (Operation timed out)) 01:50:05 --- quit: nighty__ (Client Quit) 02:16:44 --- join: qFox (i=C00K13S@132pc222.sshunet.nl) joined #forth 02:51:28 --- join: GeDaMo (n=gedamo@dyn-62-56-77-42.dslaccess.co.uk) joined #forth 03:46:48 --- quit: JasonWoof ("leaving") 04:05:14 --- join: crc (i=d8012b82@gateway/web/ajax/mibbit.com/x-23bfd311d7465454) joined #forth 04:05:14 --- mode: ChanServ set +o crc 04:08:15 --- quit: ASau` (Remote closed the connection) 04:21:47 --- quit: GeDaMo ("Leaving.") 04:42:03 --- quit: crc ("http://www.mibbit.com ajax IRC Client") 05:15:34 --- join: aguaithefreak (n=aguai@118-160-16-203.dynamic.hinet.net) joined #forth 05:51:41 --- join: snowrichard (n=richard@12.169.182.169) joined #forth 06:05:03 --- quit: snowrichard ("Leaving") 06:30:16 --- join: KipIngram (n=kip@c-98-201-0-141.hsd1.tx.comcast.net) joined #forth 06:47:16 --- quit: KipIngram ("Leaving") 07:50:02 --- join: aguaithe1reak (n=aguai@118-169-170-128.dynamic.hinet.net) joined #forth 07:52:38 --- quit: aguaithefreak (Nick collision from services.) 08:50:25 --- join: GeDaMo (n=gedamo@dyn-62-56-77-42.dslaccess.co.uk) joined #forth 08:50:43 --- join: snowrichard (n=richard@12.169.182.169) joined #forth 08:50:48 --- quit: snowrichard (Read error: 104 (Connection reset by peer)) 09:48:37 --- join: aguaithefreak (n=aguai@118-169-170-50.dynamic.hinet.net) joined #forth 10:00:34 --- quit: aguaithe1reak (Read error: 110 (Connection timed out)) 10:56:31 --- join: qF0x (i=C00K13S@132pc222.sshunet.nl) joined #forth 11:03:53 --- join: joelr1 (n=joelr1@169.Red-88-3-7.staticIP.rima-tde.net) joined #forth 11:03:57 good evening 11:06:15 is there an efficient algorithm to round up a number to a multiple of 16? 11:06:24 with just a couple of assembler instructions 11:12:40 joelr1: 15 + 15 invert and ( off the top of my head ) 11:13:26 hmm 11:14:16 GeDaMo: cool! thanks 11:14:30 --- quit: qFox (Read error: 110 (Connection timed out)) 11:14:52 GeDaMo: you are good! 11:15:01 ALIGN uses that pattern 11:15:08 oh, ok 11:15:14 :D 11:16:24 --- join: ygrek (i=user@gateway/tor/x-2c865d6378ea6fe8) joined #forth 11:16:30 --- nick: qF0x -> qFox 11:17:35 Only works for powers-of-2, of course 11:23:22 true 11:37:00 --- quit: joelr1 () 12:09:08 --- join: snowrichard (n=richard@12.169.182.169) joined #forth 12:24:12 --- join: joelr1 (n=joelr1@169.Red-88-3-7.staticIP.rima-tde.net) joined #forth 12:24:43 GeDaMo: another quick question related to the previous one... how about a fast MOD 16? 12:24:59 15 and 12:25:03 ugh 12:25:07 hmm 12:25:25 No? 12:25:31 GeDaMo: i don' tthink so 12:25:48 3 15 and . 3 ok 12:26:04 17 15 and . 1 ok 12:26:27 You're looking for the remainder of dividing by 16, right? 12:26:49 GeDaMo: i'd like to know how many bytes i need to align to 16 12:27:01 except i'm aligning the stack in assembler 12:27:06 err 12:27:22 not the stack since that alignds down with 15 invert and 12:27:38 here 12:27:56 i have n arguments to push onto the stack, each is 4 bytes, right 12:28:06 Yes 12:28:15 i need to _pad_ the stack so that once the arguments are pushed, the stack is aligned to 16 bytes 12:28:35 so i need n cells MOD 16 but in assembler 12:28:44 do i? 12:29:24 i'm doing this in forth at the moment, for another reason 12:29:25 4096 MOD NEGATE 4095 AND 12:29:37 i think there's a simpler way to do this, though 12:29:42 in assembler 12:30:53 --- join: JasonWoof (n=jason@c-66-31-44-71.hsd1.ma.comcast.net) joined #forth 12:30:53 --- mode: ChanServ set +o JasonWoof 12:31:01 works 12:31:01 1 15 MOD NEGATE 15 AND . 15 ok 12:31:02 2 15 MOD NEGATE 15 AND . 14 ok 12:31:10 Doesn't the "15 + 15 invert and" work? 12:31:41 GeDaMo: that's a different bit which calculates the total number of bytes i need to remove from the stack, arguments and padding 12:32:00 after the call 12:32:32 but before the call i need to pad the stack so that pad + n-args cells is on a 16-byte boundary 12:32:48 i.e. (pad + n-args cells) % 16 = 0 12:36:32 16 swap - 15 and 12:36:56 16 swap - 16 mod 12:37:41 I think this one is the most readable: 16 swap - 16 mod 12:38:13 nono 12:38:16 i need assembler 12:38:33 and mod is expensive 12:38:41 use 15 and then 12:38:47 is - expensive? 12:39:32 well, i need to know how much to pad N cells to the next 16 boundary by subtracting from the stack pointer 12:39:37 let me check 15 and 12:39:58 actually, i already did check 12:40:04 3 15 and . 3 ok 12:40:05 17 15 and . 1 ok 12:40:08 doesn't work 12:41:10 hmm 12:41:12 wait 12:41:15 i'm an idiot 12:41:33 this is indeed right 12:41:40 3 to 0 and 1 to 16 12:41:51 GeDaMo, JasonWoof: thanks! 12:44:42 often I prefer calculating the address of the boundary, instead of the number of bytes before it 12:44:59 JasonWoof: then i'd need to move into esp and offset 12:47:07 : align-16 ( addr -- addr2 ) 15 + MASK and ; 12:47:24 * JasonWoof forgets what MASK is 12:47:29 -16 or something 12:47:32 15 invert 12:47:59 GeDaMo: yeah, -16 :) thanks 12:48:05 :P 12:48:39 I've not used NEGATE and INVERT because I never remember which is which... and habit :) 12:48:55 : align-16 ( addr -- addr2 ) 15 + -16 and ; 12:49:06 oop, bad name 12:49:11 : aligned-16 ( addr -- addr2 ) 15 + -16 and ; 12:50:31 --- quit: snowrichard ("Leaving") 12:50:48 right 12:50:51 thank you guys! 12:50:53 --- quit: joelr1 () 12:56:06 --- quit: ygrek (Remote closed the connection) 13:08:24 --- join: qF0x (i=C00K13S@132pc222.sshunet.nl) joined #forth 13:25:11 --- quit: qFox (Read error: 110 (Connection timed out)) 13:28:23 --- nick: qF0x -> qFox 14:25:00 --- quit: GeDaMo ("Leaving.") 14:39:10 --- join: tathi (n=josh@dsl-216-227-91-166.fairpoint.net) joined #forth 14:39:11 --- mode: ChanServ set +o tathi 14:51:09 --- join: crc (n=charlesc@c-68-80-139-0.hsd1.pa.comcast.net) joined #forth 14:51:47 --- quit: crc (Client Quit) 14:51:59 --- join: crc (n=charlesc@c-68-80-139-0.hsd1.pa.comcast.net) joined #forth 15:04:21 --- quit: qFox ("Time for cookies!") 15:17:20 --- quit: ASau (Remote closed the connection) 15:24:47 --- quit: nxt (Read error: 110 (Connection timed out)) 15:27:54 --- join: nxt (n=lasts@77.207.25.109) joined #forth 15:31:09 --- nick: aguaithefreak -> aguai 15:32:30 --- join: ASau (n=user@193.138.70.52) joined #forth 15:44:14 --- quit: ASau (Remote closed the connection) 15:45:02 --- join: ASau (n=user@193.138.70.52) joined #forth 16:28:32 --- join: josefvukovic (n=josefvuk@M76a5.m.strato-dslnet.de) joined #forth 16:30:26 hello 16:31:33 --- quit: Baughn (Read error: 113 (No route to host)) 16:34:58 --- join: Baughn (n=svein@084202037181.customer.alfanett.no) joined #forth 16:44:06 Guten Morgen. 16:55:01 kennt hier jemand gforth tt.fs 17:05:23 --- join: sixforty (n=sixforty@204.110.227.11) joined #forth 17:30:15 --- part: josefvukovic left #forth 18:49:43 --- quit: sixforty ("recycling ampersands") 18:58:02 --- quit: Quartus () 18:59:23 --- quit: tathi ("leaving") 19:01:03 --- join: sixforty (n=sixforty@204.110.227.11) joined #forth 19:09:43 --- join: aguai_ (n=aguai@123-192-42-2.dynamic.kbronet.com.tw) joined #forth 19:13:27 --- nick: schme_ -> schmx 19:21:13 --- quit: aguai (Read error: 110 (Connection timed out)) 19:59:47 --- quit: crc () 20:15:09 --- nick: aguai_ -> aguai 20:19:15 --- join: nighty__ (n=nighty@210.188.173.245) joined #forth 20:47:41 --- join: warpzero (n=warpzero@208.74.136.141) joined #forth 20:57:06 --- quit: sixforty ("restart") 21:50:57 --- quit: mathrick (Read error: 110 (Connection timed out)) 23:10:20 --- join: snowrichard (n=richard@12.169.182.169) joined #forth 23:23:11 --- quit: snowrichard ("Leaving") 23:59:59 --- log: ended forth/09.01.19