Skip to content

Commit 7bdc854

Browse files
committed
Support BSD OS
1 parent f4d1f10 commit 7bdc854

21 files changed

+1970
-13
lines changed

BSD/bin/fasm

781 KB
Binary file not shown.

BSD/bin/listing

693 KB
Binary file not shown.

BSD/share/applications/sasm.desktop

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Desktop Entry]
2+
Name=SASM
3+
GenericName=SASM
4+
Comment=Simple crossplatform IDE for NASM, MASM, GAS and FASM assembly languages.
5+
Icon=/usr/local/share/sasm/sasm.png
6+
Exec=sasm
7+
Terminal=false
8+
Type=Application
9+
Categories=Qt;Development;IDE;

BSD/share/doc/sasm/changelog.gz

1.24 KB
Binary file not shown.

BSD/share/doc/sasm/copyright

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
This work was made by:
2+
3+
Dmitriy Manushin <Dman1095@gmail.com> on Wed, 4 Sep 2013 01:04:42 +0400
4+
5+
Upstream Author(s):
6+
7+
Dmitriy Manushin <Dman1095@gmail.com>
8+
9+
Copyright:
10+
11+
Copyright (C) 2013 Dmitriy Manushin
12+
13+
License:
14+
15+
This program is free software: you can redistribute it and/or modify
16+
it under the terms of the GNU General Public License as published by
17+
the Free Software Foundation, either version 3 of the License, or
18+
(at your option) any later version.
19+
20+
This package is distributed in the hope that it will be useful,
21+
but WITHOUT ANY WARRANTY; without even the implied warranty of
22+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23+
GNU General Public License for more details.
24+
25+
You should have received a copy of the GNU General Public License
26+
along with this program. If not, see <http://www.gnu.org/licenses/>.
27+
28+
On Debian systems, the complete text of the GNU General
29+
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".

BSD/share/sasm/NASM/macro.c

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include <stdio.h>
2+
#include <unistd.h>
3+
FILE *get_stdin(void) { return stdin; }
4+
FILE *get_stdout(void) { return stdout; }
5+
void sasm_replace_stdin(void) {dup2(open("input.txt",0),0);}

BSD/share/sasm/Projects/FASMHello.asm

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
format ELF
2+
3+
section '.data' writeable
4+
msg db 'Hello, world!', 0
5+
formatStr db "%s", 0
6+
7+
section '.text' executable
8+
public main
9+
extrn printf
10+
main:
11+
mov ebp, esp; for correct debugging
12+
push msg
13+
push formatStr
14+
call printf
15+
add esp, 8
16+
xor eax, eax
17+
ret
18+
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
format ELF64
2+
3+
section '.data' writeable
4+
msg db 'Hello, world!', 0
5+
formatStr db "%s", 0
6+
7+
section '.text' executable
8+
public main
9+
extrn printf
10+
main:
11+
mov rbp, rsp; for correct debugging
12+
and rsp, -16
13+
mov rdi, formatStr
14+
mov rsi, msg
15+
call printf
16+
mov rsp, rbp
17+
xor rax, rax
18+
ret
19+

BSD/share/sasm/Projects/GASHello.asm

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.data
2+
msg:
3+
.asciz "Hello, world!\n"
4+
5+
.extern printf
6+
.text
7+
.global main # entry point
8+
main:
9+
movl %esp, %ebp # for correct debugging
10+
pushl $msg
11+
call printf
12+
addl $4, %esp
13+
xorl %eax, %eax
14+
ret
15+
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.data
2+
msg:
3+
.asciz "Hello, world!\n"
4+
5+
.extern printf
6+
.extern flush
7+
.text
8+
.global main # entry point
9+
main:
10+
movq %rsp, %rbp #for correct debugging
11+
andq $-16, %rsp
12+
movq $msg, %rdi
13+
call printf
14+
movq %rbp, %rsp
15+
xorq %rax, %rax
16+
ret
17+

BSD/share/sasm/Projects/NASMHello.asm

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
%include "io.inc"
2+
3+
section .data
4+
msg db 'Hello, world!', 0
5+
6+
section .text
7+
global CMAIN
8+
CMAIN:
9+
mov ebp, esp
10+
PRINT_STRING msg
11+
NEWLINE
12+
xor eax, eax
13+
ret
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
%include "io64.inc"
2+
3+
section .data
4+
msg db 'Hello, world!', 0
5+
6+
section .text
7+
global CMAIN
8+
CMAIN:
9+
mov rbp, rsp
10+
PRINT_STRING msg
11+
NEWLINE
12+
xor rax, rax
13+
ret

0 commit comments

Comments
 (0)