From: Terence on 1 Dec 2007 16:22 Still working on adding to this. Tried program on over 100 "hard" problems. Three non-solved, needing me to add two further uncommon rules. a) if "only 2 or 3 same possibilities exist in intersection of square and row (or column); three of same square in row of three still blank; then remove these three possibilities from the rest of the row (or column) and intersected square". b) same applied to four places, with same four possibilities as three blank places in intersection as above, and fourth place in same square elsewhere. Remove four possibiliteis from rest of square only. Maybe that will do it! By hand I found drawing lines from one "onely two possibilities" by each implied route of possibile resolution, always causes one route (the invalid one) to arrive a a point of oppossite conclusion, leaving other route and victor and solution. But programming this is fiendish. Solving by exhaustion is, to me, cheating.
From: Spam Killer on 1 Dec 2007 18:50 Ooops! I accidently hit an 'a' and when it went in I found that error: >[<32 chartab: b$ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 b$ 0 #192] The last line should be changed to: 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0] [<charpad: b$ 0 #192] I'm always surprised how easily such errors slip into a post, and ok, that calls for a bonus pack. The stuff below inserted before another P1: in the MainWindowProc will set the cursor with the left mouse button. P1: cmp eax &WM_LBUTTONDOWN | jne P1> movzx eax w(a)lParam | mul d${d$ 0a3d70a4} imul esi edx 25 | mov d$current_column edx movzx eax w(a)lParam+2 | mul d${d$ 0a3d70a4} imul edi edx 25 | mov d$current_row edx call 'user32.SetCaretPos' esi edi jmp E0>> -- wfz
From: Spam Killer on 1 Dec 2007 19:03 On Sat, 1 Dec 2007 13:22:06 -0800 (PST), Terence wrote: >Still working on adding to this. >... If you want feedback from the group, you would have to supply an URL to your program. -- wfz
From: Herbert Kleebauer on 1 Dec 2007 22:35 Terence wrote: > > Still working on adding to this. > Tried program on over 100 "hard" problems. > Three non-solved, needing me to add two further uncommon rules. Can you please post this 3 puzzles. I'm still looking for an example which can't be solved with a very simple algorithm with only 1 level of indirection. Here five examples (and the binary of the program; assembler source already posted here) which I was told to be hard to solve, but which the program still solves. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @echo off echo Bj(a)jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>sudo.com echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU WwX0GwUY Wv;ovBX2Gv0ExGIuht6>>sudo.com echo }e{f?D[@xe?c??P(a)ge?s?Bu?ok??suq\H{P?eov\eQp[AjNwHefdGjUKFe>>sudo.com echo ft??E?eB}RCEBMSaf=Ngel??A?Wge\??@?ANe`??n(a)ge?s??uA1s?S[}eX>>sudo.com echo ??D?PxeX????Jefd?DEwe{tPOg(a)NAyeH????H=eH????ODexeWsP?WgFf?>>sudo.com echo ?OUHeHzge\????essP?UgFe??OeaP1[tLt_@e=efOSeEHQCEBMtaflsweH>>sudo.com echo ??D?e[jRDEwAj??oweMc?CuBKj?KWweH??D?~ge=??@?[ge\??A?]gel??>>sudo.com echo A?e_eTD[}Ee??OE_~Ij??o_eMS_}eh??E?[~eX??D?PxeX????efrV`edU>>sudo.com echo BeOue_eTD[}Ee??O?PxEe??Of~p[EJeHt?D]BeZde(a)NROg@NAyeH????Zp>>sudo.com echo epH=eH????ODexfbsPUHeHUge\????eHrP~NB}OpepeMjRtZD]HeDcCjRN>>sudo.com echo JBexPe~vLeaVePt\sZD]EwfCHefdGj]K_@e=efOSeEHQCEBMUafl~DexGN>>sudo.com echo e`~~==`e~VewO]BeBfe(a)GRxO`xeBe\}e_d?D[@xe?c??H?ze?c??G?ef?S>>sudo.com echo eEJQfAH]CBe(a)ef]U]SJ_tJeTAxqrDNe`??xB@e?seOiR=OHKeB}RgDNw??>>sudo.com echo ??EBexafcs}eCf?D[@xe?c??H?ze?c??G?ef?SeEJQfAH]kLeHefZTlkLU>>sudo.com echo ef?SmCB_JefDemSWftJteAx[eDNg????i@e=HeOC}=OrNeBC?TDIe??OCE>>sudo.com echo BMxafl[}eX??D?BxeH????BzeH????JefdHeEcefAVCEBCJefDfCUPEBeP>>sudo.com echo efGSGUJCBefDfcEPUJePefcSgEBCJefDfgUPEBePefkSkUJCBefDfGETUJ>>sudo.com echo ePefGTKEBSJefDfKUTEBePefOTOUJStAx[@e`seOiR=OHKtB}RBeTceKER>>sudo.com echo PtJdEBexafGt`eCUewO]`eBVexO]_eBVeLoQ?IgJo??_geIs??AA}e?c?D>>sudo.com echo [@ze?c??H?=e?c??H?ef?SeUJQCEBMIxeH????eooQqiP1?eFSuaf=emoQ>>sudo.com echo ?MgFe??OYtLteLoQ?AgFo??_geIs??y?Je?Se?t\eO`X_eBVEHexCkfhGs>>sudo.com echo ?F_geL????eqj1eO`X_eBVy~saxDW`p?@?`LZNO`eduNe`DWECeBe\Wa_X>>sudo.com echo ?sDWDWyE?@xA?@zAe`LReO`X?wBJ`LKLhILOdkkTk`fTmh_SstoTIL??qh>>sudo.com echo cTsbdT_xkDknrTcduTIL??knrTcduThv_S_gsDdmnTdq_SqtbTnhrTL?m@>>sudo.com echo nmISr_sPuknTa`dT_dkDshvTn_gP_dmDbdqTrqtTmnhTm??O0xxxxxxxxx>>sudo.com :::::::::::::::::::::::::: puzzle 1 echo 000 000 501 >a1 echo 000 040 060 >>a1 echo 620 300 000 >>a1 echo 001 702 000 >>a1 echo 000 406 083 >>a1 echo 007 000 000 >>a1 echo 083 000 009 >>a1 echo 700 050 400 >>a1 echo 000 900 100 >>a1 :::::::::::::::::::::::::: puzzle 2 echo 000 060 080 >a2 echo 700 500 000 >>a2 echo 000 801 000 >>a2 echo 009 006 000 >>a2 echo 000 000 201 >>a2 echo 000 024 600 >>a2 echo 030 000 052 >>a2 echo 105 003 000 >>a2 echo 020 900 408 >>a2 :::::::::::::::::::::::::: puzzle 3 echo 060 700 080 >a3 echo 040 050 900 >>a3 echo 000 001 003 >>a3 echo 002 000 001 >>a3 echo 070 004 060 >>a3 echo 800 003 500 >>a3 echo 900 800 000 >>a3 echo 001 020 070 >>a3 echo 050 006 000 >>a3 :::::::::::::::::::::::::: puzzle 4 echo 070 080 050 >a4 echo 900 000 002 >>a4 echo 000 405 000 >>a4 echo 006 040 700 >>a4 echo 300 702 004 >>a4 echo 000 050 900 >>a4 echo 004 803 000 >>a4 echo 700 000 009 >>a4 echo 030 090 010 >>a4 :::::::::::::::::::::::::: puzzle 5 echo 000 005 009 >a5 echo 001 000 300 >>a5 echo 040 902 010 >>a5 echo 506 030 007 >>a5 echo 000 020 000 >>a5 echo 003 000 408 >>a5 echo 090 500 020 >>a5 echo 007 000 900 >>a5 echo 000 008 000 >>a5 :::::::::::::::::::::::::: puzzle 6 (an easy one) echo 400 000 582 >a6 echo 000 503 000 >>a6 echo 700 028 090 >>a6 echo 897 000 050 >>a6 echo 304 090 108 >>a6 echo 060 000 937 >>a6 echo 070 630 005 >>a6 echo 000 807 000 >>a6 echo 238 000 001 >>a6 sudo <a1 pause sudo <a2 pause sudo <a3 pause sudo <a4 pause sudo <a5 pause sudo <a6 pause for %%i in (a1 a2 a3 a4 a5 a6 sudo.com) do del %%i :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Evenbit on 3 Dec 2007 00:10
On Nov 30, 5:38 pm, Frank Kotler <fbkot...(a)verizon.net> wrote: > > Presto! Thanks! Lest I lose it again, I've repackaged it to include just > the Nasm examples, and stuck it up as: > > <http://mysite.verizon.net/fbkotler/nasm-pgu-examples.tar.bz2> > > The "READDME" I put with it goes like: > > -------------------------- > These are the examples from Jonathan Bartlett's book, > "Programming from the Ground Up", which uses Gas syntax, > kindly translated to Nasm syntax by Wilhelm Zadrapa. > > Note that these are for Linux - sorry, Windows users. > Here are two of those examples transmuted to Windows (using MinGW): ---------------------------------------------- ;; Time-stamp: <> -*-nasm-*- ;; windows.inc: Common Windows Definitions. ; Library call %macro lcall 1 extern %1 call %1 %endmacro # Standard File Descriptors STD_INPUT_HANDLE equ -10 STD_OUTPUT_HANDLE equ -11 STD_ERROR_HANDLE equ -12 # Common Status Codes END_OF_FILE equ 0 ---------------------------------------------- ;; Time-stamp: <> -*-nasm-*- ;; helloworld.asm: This program writes the message "hello world" and exits. %include "windows.inc" global _main section .text _main: push helloworld lcall _printf push 0 lcall _exit section .data helloworld db "hello world", 10, 0 ---------------------------------------------- ;; Time-stamp: <> -*-nasm-*- ;; helloworld-nolib.asm: This program writes the message "hello world" and exits. %include "windows.inc" global _main section .text _main: push DWORD STD_OUTPUT_HANDLE lcall _GetStdHandle@4 push DWORD 0 push written push DWORD HWLEN push helloworld push eax lcall _WriteFile(a)20 push DWORD 0 lcall _ExitProcess@4 section .data helloworld db "hello world", 10 HWLEN equ $ - helloworld written dd 0 Nathan. |