summaryrefslogtreecommitdiff
path: root/frontends/kolibrios/loadhttp.asm
diff options
context:
space:
mode:
authorAshish Gupta <ashmew2@gmail.com>2017-04-05 21:39:01 +0200
committerAshish Gupta <ashmew2@gmail.com>2017-10-25 22:04:54 +0200
commita618be2a69a347128a4e29c879abf4a913421f52 (patch)
treebc2c47924baf985e202b61bcf4c9acec7fe44ea1 /frontends/kolibrios/loadhttp.asm
parent341c22d2a593040c558de5f9b82d3f740207d82f (diff)
downloadnetsurf-a618be2a69a347128a4e29c879abf4a913421f52.tar.gz
netsurf-a618be2a69a347128a4e29c879abf4a913421f52.tar.bz2
Add kolibrios/ dir : Step 1 towards porting this to Kolibri OS
Diffstat (limited to 'frontends/kolibrios/loadhttp.asm')
-rw-r--r--frontends/kolibrios/loadhttp.asm64
1 files changed, 64 insertions, 0 deletions
diff --git a/frontends/kolibrios/loadhttp.asm b/frontends/kolibrios/loadhttp.asm
new file mode 100644
index 000000000..0a38c225e
--- /dev/null
+++ b/frontends/kolibrios/loadhttp.asm
@@ -0,0 +1,64 @@
+format coff
+use32 ; Tell compiler to use 32 bit instructions
+
+section '.flat' code ; Keep this line before includes or GCC messes up call addresses
+
+include 'struct.inc'
+include 'proc32.inc'
+include 'macros.inc'
+purge section,mov,add,sub
+
+include 'network.inc'
+include 'http.inc'
+include 'dll.inc'
+
+virtual at 0
+ http_msg http_msg
+end virtual
+
+public init_network as '_init_network_asm'
+
+;;; Returns 0 on success. -1 on failure.
+
+proc init_network
+
+ mcall 68,11
+
+ stdcall dll.Load, @IMPORT
+ test eax, eax
+ jnz error
+
+ mov eax, 0
+ ret
+
+error:
+ mov eax, -1
+ ret
+endp
+
+@IMPORT:
+
+library lib_http, 'http.obj'
+
+import lib_http, \
+ HTTP_get , 'get' , \
+ HTTP_head , 'head' , \
+ HTTP_post , 'post' , \
+ HTTP_find_header_field , 'find_header_field' , \
+ HTTP_send , 'send' , \
+ HTTP_receive , 'receive' , \
+ HTTP_disconnect , 'disconnect' , \
+ HTTP_free , 'free' , \
+ HTTP_escape , 'escape' , \
+ HTTP_unescape , 'unescape'
+
+public HTTP_get as '_http_get_asm'
+public HTTP_head as '_http_head_asm'
+public HTTP_post as '_http_post_asm'
+public HTTP_find_header_field as '_http_find_header_field_asm'
+public HTTP_send as '_http_send_asm'
+public HTTP_receive as '_http_receive_asm'
+public HTTP_disconnect as '_http_disconnect_asm'
+public HTTP_free as '_http_free_asm'
+public HTTP_escape as '_http_escape_asm'
+public HTTP_unescape as '_http_unescape_asm'