home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,957 of 4,675   
   firr to All   
   Re: asm improvements?   
   26 Aug 17 09:15:49   
   
   From: profesor.fir@nospicedham.gmail.com   
      
   W dniu sobota, 26 sierpnia 2017 16:55:29 UTC+2 użytkownik Rick C. Hodgin   
   napisał:   
   > On Saturday, August 26, 2017 at 7:55:17 AM UTC-4, firr wrote:   
   > > im typing in some more menmonics and thing that surprised me   
   > >    
   > > mov eax, eax   
   > > mov ebx, ebx   
   > > mov ecx, ecx   
   > > mov edx, edx   
   > >    
   > > mov eax, [eax]   
   > > mov ebx, [ebx]   
   > > mov ecx, [ecx]   
   > > mov edx, [edx]   
   > >    
   > > do it really works?   
   >    
   > It will encode, but it won't necessarily work.   
   >    
   > If you're really looking to do something new, why not remove the   
   > mechanics of the assembly mnemonic for common instructions?   
   >    
   >     eax = eax;   
   >     ebx = ebx;   
   >     ecx = ecx;   
   >     edx = edx;   
   >    
   >     eax = [eax];   
   >     ebx = [ebx];   
   >     ecx = [ecx];   
   >     edx = [edx];   
   >    
   > For common operations, it would work well:   
   >    
   >     eax *= ebx;   
   >     edx += [esi+ebx+4];   
   >     ebx = myVar[esi+ebx];   
   >    
      
   now this is no assembler (it is samll 'script' though compiled  language )   
   (asembler is when you see atomic    
   instructions)   
      
   assembler btw imo needs quite opposite ;c it needs not touching    
   instruction mnemonics but register names - assembly is (as i realized once   
   ago) unreadable not becouse you got add instead + but   
   becouse you got eax ebx ecx edx   
   instead or real meningful names   
      
   i was thinking to make global    
   or locall aliases on register names   
      
   sorta working like this   
      
   alias eax pos_x    
   alias ebx pos_y    
      
   mov pos_x 100   
   mov pos_y 100   
   next:   
   call set_pixel   
   add pos_x 10   
   cmp pos_x 640   
   jb next   
      
   unalias pos_x   
   unalias pos_y   
      
   but with a bit other,m better syntax   
      
   there is also an option to use double naming   
      
   mov eax@pos_x 100   
   mov ebx@pos_y 100   
   next:   
   call set_pixel   
   add eax@pos_x 10   
   cmp eax@pos_x 640   
   jb next   
      
   where this @pos_x is just 'one word commentary' (may be eventually with a bit   
   of assembly checking if someone not write ebx@pos_x what may be detected)or   
   both may eventually be glued like that   
      
   mov eax@pos_x 100 ; invite alias   
   mov ebx@pos_y 100 ;   
   next:   
   call set_pixel   
   add pos_x 10        ;just use   
   cmp pos_x 640   
   jb next   
      
   or   
      
   eax@pos_x  ; invite alias   
   ebx@pos_y   
      
   mov pos_x 100    
   mov pos_y 100    
   next:   
   call set_pixel   
   add pos_x 10        ;just use   
   cmp pos_x 640   
   jb next   
      
   this is my old idea ** and quite easy to code, howewer this was digression as   
   i dont asked    
   how to extend assembly language now, but what code snippeds (in totally   
   classic asembler) i could try to assemble when i sit and type in opcodes into   
   it   
      
      
   ** the other idea would be yet to stay (left) mnemonics as they are   
   but not write register names only human names and let the assembler fill that   
   names with register names   
   in automatic   
      
   this is also good idea - especially when i would need to translete c code to   
   my assembler and needed to do such kind of operation anyway, heare giving that   
   to assembly would deburden c compiler form boring work (still that being   
   nontopic my question - i    
   asked for asm snipets based on which i could prepare and test my assembler , -   
   besides that all asembler is still fun, win32 assembly is in some way more fun   
   than old ones -its becouse you seamlesly and naturalely can call   
   any dll entry points (functions)   
   which is good makink assembly nice   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca