Skip to content

Instantly share code, notes, and snippets.

@bacek
Created March 25, 2009 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bacek/85406 to your computer and use it in GitHub Desktop.
Save bacek/85406 to your computer and use it in GitHub Desktop.
.sub 'main' :main
$P0 = socket 2,1,0
$P1 = sockaddr "www.ibm.com", 80
$P0.'connect'($P1)
$P0.'send'("HEAD /en/us HTTP/1.0\r\nHost: www.ibm.com\r\nConnection: close\r\n\r\n")
loop:
$S0 = read $P0, 1024
unless $S0 goto done
print $S0
goto loop
done:
say ""
say "DONE!!!"
.end
# vim: ft=pir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment