Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

QUALITY ASM PROGRAMS

Name: Anonymous 2011-12-07 17:14

I CALL IT THE NOPINATOR
POST SOME OF YOUR QUALITY ASM

nop
nop
nop
nop
nop
section .data                       
str:     db 'Nop nop nop nop nop!', 0Ah       
str_len: equ $ - str               
nop
nop
nop
nop
nop
section .text                
global _start                          
_start:                             
mov    eax, 4                  
nop
nop
nop
nop
nop
mov    ebx, 1                  
mov    ecx, str               
nop
nop
nop
nop
nop
mov    edx, str_len            
int    80h                     
nop
nop
nop
nop
nop
mov    eax, 1                 
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nopmov    ebx, 0                   ; specify return code for OS (0 = everything's fine)
int    80h                      ; tell kernel to perform system call
nop
nop
nop

Name: Anonymous 2011-12-07 22:45

>>3

lots of cpus use something called a pipeline, where they process more than one instruction in a single moment to speed things up. This creates some issues though and sometimes later instructions need to be stalled before the current one reaches a certain point in its reading/execution/writing/whatever it might be doing. Hardware can be used to detect when this happens, but it costs money, so there are architectures that don't have hardware to check, and instead, the compiler has to
insert NOPS to avoid that from happening.

for a more complete answer, check this out:

http://en.wikipedia.org/wiki/Classic_RISC_pipeline

And go to the Hazards, Data Hazards section, and read it all the way to the end until it mentions MIPS.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List