[00:18] MSG: Quit: humhum [00:23] MSG: Quit: Leaving [07:03] Join: sh0ne joined #corewars [07:06] Hi sh0ne [07:08] MSG: Remote host closed the connection [07:10] Join: sh0ne joined #corewars [07:12] Hi everybody :-) [07:19] MSG: Remote host closed the connection [07:25] Join: sh0ne joined #corewars [08:04] MSG: Ping timeout: 240 seconds [09:03] Join: fiveop joined #corewars [12:35] Hmmm... [13:32] Join: voe joined #corewars [13:33] hello all [13:45] Hi Voe [15:01] oops was afk, hello Metcalf [15:45] hi [15:45] hello [15:47] you must be new around here, can i be of assistance? [15:50] I am new, and as of right now I don't need any, thank you for the offer though. If I do run into any problems, I'll be sure to let you know [15:50] I just discovered core wars today, while learning ASM [15:58] What kind of asm? [16:04] I am on linux, using gas and nasm [16:05] MSG: Ping timeout: 240 seconds [16:05] Join: Metcalf joined #corewars [16:07] wb [16:09] Thanks, just switch ip address ;-) [16:09] did you get my last post [16:10] Found it in the log. I use nasm on Windows [16:11] But I wouldn't be much help, because I write 16 bit code [16:11] right now the tutorial i am using does gas, i plan to switch to nasm once i understand this better [16:12] started finally coding ASM in school too, took me 20 minutes to finish the second lab [16:12] ..and spent rest of the time explaining to the guy before me what a pointer is [16:12] i was so lost for awhile, and im not even new to programming in general [16:13] but this one tutorial...im reading through it right now, and it just hit me like an epiphany [16:13] and i'm picking it up very quickly now [16:14] (8051 is quite a bit different from redcode, but that didnt stop me from getting really, really, bored during the lab) [16:14] By the way, does anyone here know how to ensure a program running in an XP dosbox doesn't lose it's share of processing time? [16:14] They tend to slow down after a while [16:14] I always fancied playing with 8051 [16:15] do you think redcode/codewars is a good way to get acquainted with asm [16:15] upgrade your dosbox, dont play with the speed-dials [16:15] or will it just confuse me [16:15] yes/yes [16:16] Redcode is Neumann architecture read left-right [16:16] :-) [16:16] 8051 is Harward right-left [16:16] There's some real algorithms written in redcode here - http://impomatic.blogspot.com [16:21] Interesting. Thank you for the link [16:23] It's my blog, so I can't resist mentioning it every now and then :-) [16:23] heh :P [16:27] is there any way to play multiplayer [16:27] over the net [16:27] the hills [16:28] hey met.. [16:28] is there linux support? [16:28] pmars can be compiled in 'nix [16:28] oh i see the sorce now im sorry [16:28] i didnt look down there [16:29] theres also an graphical simulator for linux, but i dont exactly trust it [16:29] what would be a benchmark score for your tiny bench? [16:29] i think im using that one [16:29] it was in my package manager [16:29] (but i dont use graphical 'nix either, it was 100% within rules so its better than nothing) [16:30] Scores are a little bit above current hill scores [17:08] Join: sh0ne joined #corewars [17:08] hi [17:08] hi [17:19] Metcalf, are you still there [17:33] MSG: Ping timeout: 240 seconds [17:34] Join: Metcalf joined #corewars [17:36] Join: OoS joined #corewars [17:40] MSG: Ping timeout: 240 seconds [17:43] hrm. [17:43] Hmmm... [17:43] Nick Change: OoS changed nick to Metcalf [17:44] yes, still here :-) [17:44] I'm not sure if you'll be able to help or not...but it's worth a shot [17:44] I'll try [17:46] I have a program that goes through numbers in a list [17:47] and keeps track of the greatest number [17:47] Okay [17:47] the last number in my list [17:47] is the number my loop checks for to see if it is finished [17:48] i would like to set it up, so i don't have to do that, so i can just determine the length of the list, and if i have reached the end [17:49] Hmmm... [17:49] You need either a marker at the end, or to know the length in advance. [17:50] If it doesn't need to be flexible, you can have a label at the beginning, a label at the end and subtract one from the other [17:50] E.g. mov cx, end_of_list - start_of_list [17:51] i swear i've seen before, just frogot how to do it, another variable, that is solely for the length of my list [17:51] If you need it to be flexible you need to store your lists either with a marker at the end, or with the length stored at the beginning [17:52] how would i do that [17:59] mov cx,word[length] [17:59] mov al,0 [17:59] mov si,list_top [17:59] next: [17:59] cmp al,byte[si] [17:59] jnc lower [17:59] mov al,byte[si] [17:59] lower: [17:59] inc si [17:59] loop next [17:59] length: [17:59] dw list_end - list_top [17:59] list_top: [17:59] db 12 [17:59] db 9 [17:59] db 42 [17:59] db 127 [17:59] db 18 [17:59] list_end: [17:59] It's 16 bit asm, sorry [18:00] is there some way to past my code, i know undernet or efnet has a paste server [18:01] And it checks bytes, you can easily adjust it to check words. Also, if you need it to store the location of the highest value rather than just the value, you'll need a couple of extra instructions. [18:01] Just use any paste bin, and post a link to it [18:03] It's normal to store the length, and adjust the value when the list is manipulated and changes size [18:03] jnc == jump not c? [18:04] Yes, jump no carry [18:04] hm [18:04] hey fiver [18:04] cmp al,byte[si] set's carry if al < byte[si]? [18:04] hi bvowk [18:05] No, it's the other way around. [18:05] oh [18:05] Fiveop has been reading too much redcode ;-) [18:05] so what you do there is nothing? :P [18:05] Metcalf: actually I haven't :P [18:06] so what you're doing is 0 the whole list [18:06] http://rafb.net/p/x7eW5x93.html [18:06] Hmmm... [18:06] voe: the code above doesn't work with empty lists ;-) [18:07] oops [18:07] thats the newest version where i was trying to figure it out [18:09] just a second [18:11] http://rafb.net/p/FgTKcZ74.html [18:11] was too lazy to change my comments [18:11] the code now gets the lowest number [18:13] does %edi,4 multiply edi by 4? [18:15] Shouldn't you compare edi to length_count? [18:15] edi stores the index of data_items thats being compared currently [18:15] that moves it to the next one in the list [18:16] well length_count is what i was trying to figure out how to implement, right now as you can see, line 17 is how i check for a finish [18:16] Apart from that, I can't really comment because I'm not very familiar with 32 bit x86 [18:17] ah okay [18:17] well thank you for trying [18:17] right now the loop exit is hardcoded for when number 3 comes up [18:19] I still think line 20 should be edi, not eax [18:19] But I might have missed something [18:20] It'd be easier if we worked in redcode :-) [18:22] no what line 20 is doing [18:22] is putting the nexxt number in the list into eax [18:23] which is compared to ebx (smallest number) [18:32] Line 20 = cmpl length_count, %eax ? [18:32] youre looking at the first code paste [18:36] Oh, okay :-) [18:36] :P [18:36] check the 2nd link [18:36] its fixed [18:40] Does it pull out the largest value if you change line 22 from jge to jle? [18:40] Or does it fail? [18:42] yep it works [18:42] sorry about my sloppy code [18:42] its my first time [18:42] if changed to jle it returns the greatest from the list, 255 [18:47] brb need to run a couple errabds [19:27] MSG: Quit: Leaving [19:35] back [19:53] * voe pokes Metcalf [19:55] Join: CoreOld joined #corewars [19:57] Hi CoreOld [19:57] * Metcalf pokes voe with a rusty metal spike [19:57] yowch [19:57] hi Metcalf [19:57] hehe [21:10] MSG: Quit: Trillian (http://www.ceruleanstudios.com [22:56] MSG: Read error: Operation timed out