aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTimber2024-06-03 17:06:52 +0000
committerGitHub2024-06-03 17:06:52 +0000
commit4dd35a32edc18394e54ad9f116c21ea268bef8ab (patch)
treee578a539ead7b26179e6bd3a40b8e3d9cb4ca6b1
parent54577a8394e0190508d07856bf99ed18f5f35caf (diff)
C syntax highlighting
...is better than asm for this weird language
-rw-r--r--future-of-pwning-1.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/future-of-pwning-1.md b/future-of-pwning-1.md
index b3d1862..1076ed1 100644
--- a/future-of-pwning-1.md
+++ b/future-of-pwning-1.md
@@ -45,7 +45,7 @@ They do have [47](https://github.com/orgs/ForwardCom/followers) followers at the
So, let's first get familiar with the assembly language of *ForwardCom*.
It seems to be a reasonable approach to start with a *Hello world* project. Therefore we can look in the examples' `hello.as`:
-```asm
+```C
/**************************** hello.as **************************************
* Author: Agner Fog
* date created: 2018-02-23
@@ -153,7 +153,7 @@ int main()
Except for the `buf` allocation and the storing of return values, we already know how to do all of this stuff.
For memory allocation we can look into the code examples again -- specifically [`guess_number.as`](https://github.com/ForwardCom/code-examples/blob/master/guess_number.as) sounds promising, since it should expect user input and thus store strings.
Here there's two relevant regions:
-```asm
+```C
%buffersize = 0x20 // size of input text buffer
// ...
bss section datap uninitialized // uninitialized read/write data section
@@ -167,7 +167,7 @@ So we can statically allocate memory in the `datap uninitialized` section.
For storing of return values we can learn (again from the examples) that it's stored in `r0`.
Now by modifying the `hello.as` program it's quite straight forward to implement our solution:
-```asm
+```C
%buffersize = 256
extern _fopen: function