Prev: masm linking from console
Next: NASM HelloWorld - DOS
From: Dirk Wolfgang Glomp on 23 Jul 2007 01:20 [X-Demo] Many thanks to Annie, Herbert and Frank. Dirk
From: Evenbit on 23 Jul 2007 14:26 Frank Kotler wrote: > > I took the "regular linker" version out of retirement, updated it to > Herbert's latest version (mostly), and got *that* running, finally. For > those who prefer the illogical, unreadable syntax (most of us), here 'tis. > > Best, > Frank > > ; "Annie's Heart" for Xwindows I doubt that Annie will let me play with her heart ;) but perhaps I could make an etch-a-sketch... lots of reading to do... Has anyone tried this FrameBuffer UI driver? Currently only works with 2.6.9 of the kernel, I guess, but it looks interesting: http://home.comcast.net/~fbui/ Nathan.
From: Herbert Kleebauer on 23 Jul 2007 15:52 Frank Kotler wrote: > I took the "regular linker" version out of retirement, updated it to More than 4 times the size compared to the directly generated binary! > Herbert's latest version (mostly), and got *that* running, finally. But with awful colors (did you really convert it by hand?). > test eax, eax ; ERROR > js err > > ; my apologies for propagating this sloppiness. > ; really should be "cmp eax, -4096" (or -4095?) > ; won't happen here, but we *could* get a > ; valid return over 2G! - fbk If there are bugs, you should correct them instead of propagating them! I just looked at the man pages in UBUNTU Linux and it says: -1 is returned for an error. Can't at moment check the man pages in Linspire Linux but somewhere I must have got the information that a negative return value is an error (where did you get the information about -4096). Even the include paths are different between the two Linux versions. > ; ********* Annie's code to draw a heart **************** > annie: pusha > xor ebx, ebx > > .10: inc dword [annie1] > mov ecx, 320 * 200 > xor edi, edi > .20: mov eax, edi ; byte pos in screen > xor edx, edx > mov ebx, 320 ; 320 lines > div ebx ; eax: line 0-199 edx: column 0-319 > sub eax, 120 ; center y=120 (-120 .. +79) > sub edx, 160 ; x=160 (-160 .. +159) > jg .30 > neg edx ; symmetric in x (0 .. 160) > .30: mov ebx, eax > imul ebx, ebx ; ebx = x*x > add eax, edx ; eax = x*x+y > imul eax ; eax = (x*x+y)**2 mod 2*16 > add ebx, eax > jz .40 > xor edx, edx > mov eax, 600000 > div ebx > .40: add eax, [annie1] ; change color > shr eax, 2 should be a "shr al,2", the color table has only 64 entries. > movzx eax, al > mov eax, [color+ eax * 4] > mov [screen + edi * 4], eax > inc edi > loop .20 > > popa > ; nop ??? There was a popad bug in the 386, so my assembler always generates a nop after a popad. > ret > > ; ****************** initialize 64 VGA colors ********************* > init_color: > pusha > mov esi, color > mov eax, 0 ; sic I know, a compiler never would do this, but we are only human assembly programmers. Did you find more bugs?
From: Rod Pemberton on 23 Jul 2007 20:51 "Wolfgang Kern" <nowhere(a)never.at> wrote in message news:f80d7e$kn5$1(a)newsreader2.utanet.at... > > Rod Pemberton asked: > > >> A hung ? > >> the ESC-key terminates this (former) unmoveable, frontmost box. > >> Latest upload is moveable and can be minimised (even only by taskbar). > >> > > > Damn... you want me to dl it again and tell you if it's fixed, > > don't you? > > :) TIA, <sub> yes please </sub> :) > Okay, the splash screen comes up with a bunch of check boxes and then invalid instruction error: HEXTUTOR executed an invalid instruction in module HEXTUTOR.EXE at 0167:0041aaf2. Registers: EAX=00000001 CS=0167 EIP=0041aaf2 EFLGS=00010246 EBX=00000000 SS=016f ESP=0054fca0 EBP=0054fce8 ECX=00000000 DS=016f ESI=00008d40 FS=1097 EDX=80005170 ES=016f EDI=0054fcd0 GS=0000 Bytes at CS:EIP: 0f 45 15 40 30 40 00 0f 44 15 3c 30 40 00 51 0f Stack dump: 0041aaa8 0041a3f3 0041a291 0054fcd0 00008d40 0054fce8 0054fccc 0054fd1c 00008d5c 00000000 00000000 bff7363b 00000b2c 0000000f 00000000 00000000 Rod Pemberton
From: Rod Pemberton on 23 Jul 2007 21:20
"Phil Carmody" <thefatphil_demunged(a)yahoo.co.uk> wrote in message news:87sl7gbnbu.fsf(a)nonospaz.fatphil.org... > Do you believe that the order of evaluation of a[--i]=i follows > from precedence? > I just told you it does for pre-ANSI C. I quoted the exact phrase by Dennis Ritchie of one the six "C gods" (Ritchie, Kernighan, Plauger, Gwyn, Harbison, Steele) stating that it does. Unfortunately, you didn't seem to comprehend what he stated and just reiterated your prior beliefs. Read the all of the many precedences in Section 7. Unlike ISO C, everything in the la[--j]= statement is defined by precedence and therefore order of evaluation. The concept of sequence points where the statement is dissolved into separate evaluatable pieces, partially to deal with volatile, doesn't apply. Good luck, you'll need it... Rod Pemberton |