From 1691770678adc4c079896515752372c967db3381 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 17 Jan 2022 19:07:33 -0500 Subject: development/fasm: Added (fast assembler for x86/x86_64). Signed-off-by: Willy Sudiarto Raharjo --- development/fasm/README | 9 +++ development/fasm/fasm.1 | 94 ++++++++++++++++++++++++++++++ development/fasm/fasm.SlackBuild | 123 +++++++++++++++++++++++++++++++++++++++ development/fasm/fasm.info | 12 ++++ development/fasm/fasm.rst | 85 +++++++++++++++++++++++++++ development/fasm/slack-desc | 19 ++++++ 6 files changed, 342 insertions(+) create mode 100644 development/fasm/README create mode 100644 development/fasm/fasm.1 create mode 100644 development/fasm/fasm.SlackBuild create mode 100644 development/fasm/fasm.info create mode 100644 development/fasm/fasm.rst create mode 100644 development/fasm/slack-desc (limited to 'development/fasm') diff --git a/development/fasm/README b/development/fasm/README new file mode 100644 index 0000000000..fa624dd9e6 --- /dev/null +++ b/development/fasm/README @@ -0,0 +1,9 @@ +fasm (fast assembler for the x86 and x86-64 architectures) + +The flat assembler (abbreviated to fasm, intentionally stylized +with lowercase letters) is a fast assembler running in a variety +of operating systems, in continued development since 1999. It was +designed primarily for the assembly of x86 instructions and it +supports x86 and x86-64 instruction sets with extensions like MMX, +3DNow!, SSE up to SSE4, AVX, AVX2, XOP, and AVX-512. It can produce +output in plain binary, MZ, PE, COFF or ELF format. diff --git a/development/fasm/fasm.1 b/development/fasm/fasm.1 new file mode 100644 index 0000000000..54f9e70c5f --- /dev/null +++ b/development/fasm/fasm.1 @@ -0,0 +1,94 @@ +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "FASM" 1 "2022-01-17" "1.73.29" "SlackBuilds.org" +.SH NAME +fasm \- fast assembler for the x86 and x86-64 architectures +.\" RST source for fasm(1) man page. Convert with: +. +.\" rst2man.py fasm.rst > fasm.1 +. +.\" rst2man.py comes from the SBo development/docutils package. +. +.SH SYNOPSIS +.sp +fasm [\fB\-d\fP \fIname=value\fP ...] [\fB\-m\fP \fImem\-limit\fP] [\fB\-p\fP \fIpass\-limit\fP] [\fB\-s\fP \fIsymbol\-file\fP] \fIsource\-file\fP [\fIoutput\-file\fP] +.SH DESCRIPTION +.sp +\fBfasm\fP (aka flat assembler) is a fast assembler for the x86 and +x86\-64 architectures. When executed, it will assemble the given +source file. +.sp +If no \fIoutput\-file\fP is given, the output filename will be the +\fIsource\-file\fP name with the extension replaced with \fI\&.o\fP\&. +.SH OPTIONS +.sp +The space between an option and its argument is optional (\fB\-m10\fP and +\fB\-m 10\fP are both acceptable). +.INDENT 0.0 +.TP +.B \fB\-d\fP \fIname=value\fP +Predefine a symbol (variable). May be given multiple times, as needed. +.TP +.B \fB\-m\fP \fImem\-limit\fP +Set the limit in \fI1024\-byte\fP kilobytes for the amount of memory \fBfasm\fP can +use. If the limit is exceeded, \fBfasm\fP will exit with an "out of +memory" error and nonzero exit status. Default is 16384 (aka 16MB), +minimum is 1, maximum allowed is 4194303 (~4GB)... but values ~4000000 and up +can cause \fBfasm\fP to segfault. +.TP +.B \fB\-p\fP \fIpass\-limit\fP +Set the maximum number of passes \fBfasm\fP will make over the source. Default +is 100; maximum is 65536. +.TP +.B \fB\-s\fP \fIsymbol\-file\fP +Dump symbolic information for debugging to \fIsymbol\-file\fP\&. This file +can be processed with the \fBlisting\fP, \fBsymbols\fP, or \fBprepsrc\fP tools: +see /usr/doc/fasm\-1.73.29/tools\-readme.txt for details. +.UNINDENT +.SH EXIT STATUS +.sp +Zero for successful completion, 1 for invalid command\-line option(s), +or non\-zero (apparently always 255) for any fatal assembly error. +.SH COPYRIGHT +.sp +See the file /usr/doc/fasm\-1.73.29/license.txt for license information. +.SH AUTHORS +.sp +\fBfasm\fP was written by Tomasz Grysztar. +.sp +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. +.SH SEE ALSO +.sp +The full documentation: /usr/doc/fasm\-1.73.29/fasm.txt +.sp +The fasm homepage: \fI\%https://flatassembler.net\fP +.\" Generated by docutils manpage writer. +. diff --git a/development/fasm/fasm.SlackBuild b/development/fasm/fasm.SlackBuild new file mode 100644 index 0000000000..6c3592baac --- /dev/null +++ b/development/fasm/fasm.SlackBuild @@ -0,0 +1,123 @@ +#!/bin/bash + +# Slackware build script for fasm + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# Note: the source archive includes the full source plus prebuilt 32- +# and 64-bit binaries. This SlackBuild uses the prebuilt binary to +# bootstrap the binary it's going to install. + +# I almost didn't bother with an x86_64 option. The assembler is +# 32-bit but fully static, will run fine on 64-bit without multilib, +# and there doesn't seem to be any advantage to using the 64-bit +# native binary... but upstream provides it, so I do too. Plus the +# tools need help on Slackware64 due to lack of multilib. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=fasm +VERSION=${VERSION:-1.73.29} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +# Build will fail on non-x86/x86_64. Let's fail ASAP though, not +# bother to extract the source. +case "$ARCH" in + i?86|x86_64) ;; # OK + *) cat < $PKG/usr/man/man1/$PRGNAM.1.gz + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +mv tools/readme.txt tools-readme.txt +cp -a *.txt tools/*.txt examples $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/development/fasm/fasm.info b/development/fasm/fasm.info new file mode 100644 index 0000000000..500836315d --- /dev/null +++ b/development/fasm/fasm.info @@ -0,0 +1,12 @@ +PRGNAM="fasm" +VERSION="1.73.29" +HOMEPAGE="https://flatassembler.net" +DOWNLOAD="https://flatassembler.net/fasm-1.73.29.tgz" +MD5SUM="c66e907db5fc41da7f5883307f9f37e1" +DOWNLOAD_x86_64="https://flatassembler.net/fasm-1.73.29.tgz \ + https://slackware.uk/~urchlay/src/fasm-prebuilt-tools-1.73.29.tar.xz" +MD5SUM_x86_64="c66e907db5fc41da7f5883307f9f37e1 \ + f248f854b139be8d579102736afb5c90" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/development/fasm/fasm.rst b/development/fasm/fasm.rst new file mode 100644 index 0000000000..ee6fe87749 --- /dev/null +++ b/development/fasm/fasm.rst @@ -0,0 +1,85 @@ +.. RST source for fasm(1) man page. Convert with: +.. rst2man.py fasm.rst > fasm.1 +.. rst2man.py comes from the SBo development/docutils package. + +.. |version| replace:: 1.73.29 +.. |date| date:: + +==== +fasm +==== + +--------------------------------------------------- +fast assembler for the x86 and x86-64 architectures +--------------------------------------------------- + +:Manual section: 1 +:Manual group: SlackBuilds.org +:Date: |date| +:Version: |version| + +SYNOPSIS +======== + +fasm [**-d** *name=value* ...] [**-m** *mem-limit*] [**-p** *pass-limit*] [**-s** *symbol-file*] *source-file* [*output-file*] + +DESCRIPTION +=========== + +**fasm** (aka flat assembler) is a fast assembler for the x86 and +x86-64 architectures. When executed, it will assemble the given +source file. + +If no *output-file* is given, the output filename will be the +*source-file* name with the extension replaced with *.o*. + +OPTIONS +======= + +The space between an option and its argument is optional (**-m10** and +**-m 10** are both acceptable). + +**-d** *name=value* + Predefine a symbol (variable). May be given multiple times, as needed. + +**-m** *mem-limit* + Set the limit in *1024-byte* kilobytes for the amount of memory **fasm** can + use. If the limit is exceeded, **fasm** will exit with an "out of + memory" error and nonzero exit status. Default is 16384 (aka 16MB), + minimum is 1, maximum allowed is 4194303 (~4GB)... but values ~4000000 and up + can cause **fasm** to segfault. + +**-p** *pass-limit* + Set the maximum number of passes **fasm** will make over the source. Default + is 100; maximum is 65536. + +**-s** *symbol-file* + Dump symbolic information for debugging to *symbol-file*. This file + can be processed with the **listing**, **symbols**, or **prepsrc** tools: + see /usr/doc/fasm-|version|/tools-readme.txt for details. + +EXIT STATUS +=========== + +Zero for successful completion, 1 for invalid command-line option(s), +or non-zero (apparently always 255) for any fatal assembly error. + +COPYRIGHT +========= + +See the file /usr/doc/fasm-|version|/license.txt for license information. + +AUTHORS +======= + +**fasm** was written by Tomasz Grysztar. + +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. + +SEE ALSO +======== + +The full documentation: /usr/doc/fasm-|version|/fasm.txt + +The fasm homepage: https://flatassembler.net diff --git a/development/fasm/slack-desc b/development/fasm/slack-desc new file mode 100644 index 0000000000..1a9df84ad3 --- /dev/null +++ b/development/fasm/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +fasm: fasm (fast assembler for the x86 and x86-64 architectures) +fasm: +fasm: The flat assembler (abbreviated to fasm, intentionally stylized +fasm: with lowercase letters) is a fast assembler running in a variety +fasm: of operating systems, in continued development since 1999. It was +fasm: designed primarily for the assembly of x86 instructions and it +fasm: supports x86 and x86-64 instruction sets with extensions like MMX, +fasm: 3DNow!, SSE up to SSE4, AVX, AVX2, XOP, and AVX-512. It can produce +fasm: output in plain binary, MZ, PE, COFF or ELF format. +fasm: +fasm: -- cgit v1.2.3-65-gdbad