00:00:00 --- log: started forth/09.08.21 00:18:25 --- join: DrunkTomato (n=DEDULO@ext-gw.wellcom.tomsk.ru) joined #forth 00:27:25 --- quit: malyn ("Disconnecting from stoned server.") 00:27:40 --- join: malyn (n=malyn@unaffiliated/malyn) joined #forth 01:35:20 --- quit: maht (Read error: 104 (Connection reset by peer)) 01:41:18 --- join: maht (n=maht__@85.189.31.174.proweb.managedbroadband.co.uk) joined #forth 01:52:18 --- quit: gogonkt (Read error: 60 (Operation timed out)) 01:54:32 --- join: gogonkt (n=info@218.13.54.78) joined #forth 02:51:09 --- quit: DrunkTomato () 03:15:38 --- join: GeDaMo (n=gedamo@212.225.115.96) joined #forth 04:42:13 --- quit: GeDaMo ("Leaving.") 05:07:57 --- quit: nighty__ (Client Quit) 06:39:58 --- join: nighty^ (n=nighty@x122091.ppp.asahi-net.or.jp) joined #forth 06:40:11 --- quit: nighty (Client Quit) 07:28:12 --- join: GeDaMo (n=gedamo@212.225.115.96) joined #forth 08:03:09 --- quit: _Jordan_ (wolfe.freenode.net irc.freenode.net) 08:03:09 --- quit: Deformati (wolfe.freenode.net irc.freenode.net) 08:03:09 --- quit: schme (wolfe.freenode.net irc.freenode.net) 08:03:10 --- quit: nottwo (wolfe.freenode.net irc.freenode.net) 08:03:37 --- join: Deformati (n=joe@c-76-112-68-135.hsd1.mi.comcast.net) joined #forth 08:03:39 --- join: nottwo (n=trannie@designvox-gw.iserv.net) joined #forth 08:03:39 --- join: schme (n=marcus@sxemacs/devel/schme) joined #forth 08:03:39 --- join: _Jordan_ (n=jcooper@173-45-228-22.slicehost.net) joined #forth 08:05:26 --- quit: schme (Read error: 104 (Connection reset by peer)) 08:05:29 --- join: schmx (n=marcus@sxemacs/devel/schme) joined #forth 08:21:53 --- join: aguaithefreak (i=aguai@114-44-3-235.dynamic.hinet.net) joined #forth 08:32:26 --- join: DrunkTomato (n=DEDULO@ext-gw.wellcom.tomsk.ru) joined #forth 08:44:47 --- join: InvisibleTomato (n=DEDULO@ext-gw.wellcom.tomsk.ru) joined #forth 08:46:23 --- quit: xjrn ("ChatZilla 0.9.83 [XULRunner 1.8.0.9/2006120508]") 09:07:55 --- join: jauaor (n=araujo@190.38.49.150) joined #forth 09:08:24 --- quit: DrunkTomato (Connection timed out) 09:31:52 --- join: theatrustop (n=yann@208.176.190.222) joined #forth 09:40:16 --- quit: gogonkt ("leaving") 09:40:52 --- join: gogonkt (n=info@218.13.54.78) joined #forth 09:45:20 --- quit: gogonkt (Client Quit) 09:46:25 --- join: gogonkt (n=info@218.13.54.78) joined #forth 10:40:35 --- join: kar8nga (n=kar8nga@e-6.vc-graz.ac.at) joined #forth 10:57:51 --- join: segher (n=rehges@84-105-60-153.cable.quicknet.nl) joined #forth 11:04:11 --- nick: madwork_ -> madwork 11:41:01 --- join: xjrn (n=jim@astound-69-42-10-25.ca.astound.net) joined #forth 13:35:54 --- quit: InvisibleTomato (Client Quit) 13:47:06 --- join: zzo38 (n=zzo38@h24-207-48-53.dlt.dccnet.com) joined #forth 13:47:59 Can you help me, I get a stack underflow in this program. 13:48:18 It is Gforth 13:48:46 What program? 13:50:33 I'm just pasting it to the pastebin. Just a few seconds... 13:50:39 Here it is: http://forth.pastebin.ca/1538166 13:51:13 Where are you getting the stack underflow? 13:51:58 Right after the command -HEADER- finishes executing. See the error message I got, starting at line 234 of the paste 13:52:29 Yeah, I see it 13:52:46 I put in 0 . and stuff like that inside the -HEADER- to test it, and it does execute -HEADER- completely and correctly, but then it generates an error. 13:53:54 Do you know what can cause these things? 13:54:21 --- quit: kar8nga (Remote closed the connection) 13:54:28 Not having enough values on the stack 13:54:42 I just now added DEPTH . to the end and it responds -1 why does it do that and what is going wrong? 13:54:55 Where did you put the depth? 13:55:38 I put it in more places now. I think I see now, the word -AT- is wrong. 13:56:01 Is the definition of -AT- wrong? 13:58:50 Did you write this code? 13:59:34 The stack effect of REPOSITION-FILE is ( ud wfileid -- wior ) and THROW takes the ( wior -- ) doesn't it? 13:59:36 Yes I wrote this code. 13:59:50 ud means a double cell value 14:00:13 O, so that's what wrong. 14:00:47 I'm only using 16-bit addresses here though, so I don't need double cell value. 14:00:54 How to convert a number to double-cell? 14:01:04 s>d 14:01:45 OK thanks. So if I put : -AT- S>D GB-FILE REPOSITION-FILE THROW ; then it will work? I will try that. 14:02:04 No, the s>d has to go before the -at- 14:02:11 Oh, right 14:02:15 Yes, that should work 14:03:43 Well, that fixed that problem. 14:04:08 Sorry, I was thinking you were going to put it in -header- :P 14:05:05 The reason I put it in -AT- instead is because I'm never using double-cell values anywhere in my program, so anywhere I use -AT- I can use single-cell values for the addresses. 14:05:21 Yes, good idea 14:06:36 s>d converts a signed one-cell to a signed two-cell. for unsigned (which you have, ud), you use 0 to convert a single cell to a double 14:07:14 How long is a one-cell value in Gforth? 14:07:22 some systems have a us>d for that (it's really just an alias for 0, might be more readable though) 14:07:28 depends on your system 14:08:12 type 1 cells . to figure it out 14:08:42 O thanks, why didn't I think of that? 14:08:53 No, it doesn't have us>d 14:09:29 But it is 4 bytes (32-bits) and since only 16-bits addresses in the file are being used, it shouldn't matter signed or unsigned it will still work. 14:09:43 true 14:09:58 But I guess if I want us>d I can just write 0 CONSTANT US>D if it is the same as zero, right? 14:10:04 you really don't want to depend on that though 14:10:11 sure 14:10:21 or ' 0 alias us>d 14:10:29 or : us>d 0 ; 14:10:32 etc. 14:10:34 I guess if I shouldn't depend on that, using that would be better. 14:10:46 or just write 0 14:10:58 it's common idiom 14:11:25 I know I can just write 0 but it might get a bit confusing if I forget that REPOSITION-FILE uses double-cell values 14:11:42 _all_ file offsets are double cell 14:11:44 But if I don't forget that, just 0 will be clear 14:11:51 yeah 14:11:58 I know, I already put S>D everywhere file offsets are used 14:12:18 you can compromise, and write just 0 but with a comment :-) 14:12:39 And to convert double-cell to single-cell, just use DROP right? 14:12:51 υεαη 14:12:53 yeah 14:13:31 you shouldn't need to convert often, anyway 14:13:56 I just used 0 and DROP and put a comment \ (Note: file-offsets are all double-cells) so now it is clear. 14:13:58 (if you do, you likely should factor something, or use another parameter type in places) 14:14:08 sounds good 14:16:16 And in DOS Gforth, how do I access the DOS real memory in protected mode (mostly for screen memory and keyboard and stuff like that)? 14:16:31 This is unrelated, not part of this same program, but I have been wondering how to do it anyways 14:17:09 i have no idea 14:17:14 read the manual 14:36:03 Do I need to access the C variable __djgpp_conventional_base somehow? 14:43:10 no clue 14:43:33 i thought you could just do stuff like b8000 c@ on djgpp 14:45:53 I tried that and it doesn't work 14:46:22 dunno then 14:47:44 In what way did it not work? 14:50:54 Those addresses are remapped for different purposes in Gforth, they don't point to DOS real memory 15:01:52 --- quit: xjrn (Read error: 60 (Operation timed out)) 15:05:23 --- quit: zzo38 (Remote closed the connection) 15:12:26 --- join: xjrn (n=jim@astound-69-42-10-25.ca.astound.net) joined #forth 15:21:36 --- quit: GeDaMo ("Leaving.") 16:21:40 * jauaor hears raining coming 16:21:50 * jauaor codes a bit in his stack-based lang 16:52:07 a single bit? not a whole cell? exciting! 17:38:30 --- join: zzo38 (n=zzo38@h24-207-48-53.dlt.dccnet.com) joined #forth 17:38:44 I fixed my program, it works now! Now I can compile programs for GameBoy. 17:39:53 It doesn't support everything though. It doesn't support color GameBoy, or ROM/RAM banks, packed files, and various other features, but it does most things. And I wrote a example file. 17:42:07 http://forth.pastebin.ca/1538397 17:47:51 --- quit: xjrn (Read error: 110 (Connection timed out)) 17:51:06 I don't know why the KEY-FILE command built-in to Gforth doesn't work and always blocks, but I redefined KEY-FILE to work 17:59:46 --- quit: zzo38 () 18:34:56 --- quit: Snoopy_1611 (Read error: 60 (Operation timed out)) 19:29:10 --- quit: Deformati (Read error: 104 (Connection reset by peer)) 20:03:59 --- quit: theatrustop (Read error: 110 (Connection timed out)) 20:07:32 --- quit: segher (Read error: 110 (Connection timed out)) 20:08:30 --- join: xjrn (n=jim@astound-69-42-10-25.ca.astound.net) joined #forth 21:49:35 --- join: segher (n=rehges@84-105-60-153.cable.quicknet.nl) joined #forth 22:30:41 --- part: jauaor left #forth 23:59:59 --- log: ended forth/09.08.21