⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ebfc.1

📁 ELFkickers是一组elf工具
💻 1
字号:
.TH EBFC 1 "July 1999".LO 1.SH NAMEebfc \- ELF Brainfuck compiler.SH SYNOPSIS.B ebfc[\-lxcszhv] [\-f FUNCTION] [\-o FILE] [\-i FILE] SRCFILE.SH DESCRIPTION.B ebfcis a compiler for the Brainfuck programming language, creating ELFfiles targeted for the Linux platform running under an Intel x86architecture..P.B ebfccan create standalone executables, shared libraries, or object files,and the object file can itself be targeted for a standalone executableor a shared library, as well as a simple module..SH COMPILATION OPTIONSThe following options control how the source file is compiled. It isassumed here that the name of the source file is.BR foo.b ..TP.BI \-xCompile the source code into a standalone executable file, named.BR foo ..TP.BI \-lCompile the source code into a function, named.BR foo (),in a shared library file, named.BR libfoo.so ..TP.BI \-cCompile the source code into a function, named.BR foo (),in an object file, named.BR foo.o ..TP.BI \-xcCompile the source code into an object file, named.BR foo.o ,that can then be linked into a standalone executable..TP.BI \-lcCompile the source code into a function, named.BR foo (),in an object file, named.BR foo.o ,that can then be linked into a shared library..PIf the source filename lacks a.B .bsuffix, then the entire filename will be used when creating the nameof the target file and function. (In the case of.IR -x ,the name of the target file will be.B a.outinstead.).SH OTHER OPTIONS.TP.BI \-f " FUNCTION"Use.I FUNCTIONas the name of the function to contain the compiled program. (Thisoption is not generally useful when the final target is a standaloneexecutable.).TP.BI \-o " FILE"Use.I FILEas the target filename..TP.BI \-i " FILE"Use.I FILEas the name of the source file to place in the target file. Thisoption is only meaningful if the target is an object file, and if the.I \-soption is not used..TP.BI \-sSuppress inclusion of unnecessary data in the target file. By default,.B ebfcincludes a .comment section in object and library files, and includesthe source filename in the .symtab section. These items will beremoved from the output when this option is used..TP.BI \-hDisplay help and exit..TP.BI \-vDisplay version number and exit..TP.BI \-zRead the source file in compressed Brainfuck format..SH LINKINGWhen calling a compiled Brainfuck program from within a C program, theC prototype for the Brainfuck function should have the form:.P    extern void foo(void);.SH THE BRAINFUCK PROGRAMMING LANGUAGEA Brainfuck program has an implicit byte pointer, called "the pointer",which is free to move around within an array of 30000 bytes, initiallyall set to zero. The pointer itself is initialized to point to thebeginning of this array..PThe Brainfuck programming language consists of eight commands, each ofwhich is represented as a single character..TP 4.PD 0.B >Increment the pointer..TP.B <Decrement the pointer..TP.B +Increment the byte at the pointer..TP.B \-Decrement the byte at the pointer..TP.B .Output the byte at the pointer..TP.B ,Input a byte and store it in the byte at the pointer..TP.B [Jump to the matching.B ]if the byte at the pointer is zero..TP.B ]Jump to the matching.BR [ ..PD 1.PAny other characters in the source code are treated as comments orwhitespace, and ignored..PThe semantics of the Brainfuck commands can also be succinctlyexpressed in terms of C, as follows (assuming that.I phas been previously defined as a.IR char* ):.TP 4.PD 0.B >becomes\ \ ++p;.TP.B <becomes\ \ \-\-p;.TP.B .becomes\ \ putchar(*p);.TP.B ,becomes\ \ *p = getchar();.TP.B [becomes\ \ while (*p) {.TP.B ]becomes\ \ }.PD 1.SH COMPRESSED BRAINFUCKChris Pressey introduced a compressed format for storing andtransmitting Brainfuck programs, which.B ebfccan read natively by using the.I \-zoption..PIn compressed Brainfuck, the eight commands are encoded in three bitsas follows:.TP 4.PD 0.B +000.TP.B \-001.TP.B <010.TP.B >011.TP.B [100.TP.B ]101.TP.B ,110.TP.B .111.PD 1.PEach byte in a compressed Brainfuck file can contain two or morecommands. The top two bits select between one of four possiblereadings of the lower six bits, as follows:.TP 24.PD 0Encoding\ \ \ \ BitsTranslation.TPsingleton\ \ \ 00 abc abcabc.TPpair\ \ \ \ \ \ \ \ 00 abc defabc followed by def.TPtriplet\ \ \ \ \ 10 ab cd ef0ab then 0cd then 0ef.TPrepetition\ \ 01 abc defdef repeated 2 + abc times (2-9).TPrepetition\ \ 01 abcd ef0ef repeated 2 + abcd times (2-17).PD 1.P.SH ERRORSThe compiler will issue an error message, and the compilation willfail, if the program contains unbalanced bracket commands, or if thelevel of nested brackets exceeds the compiler's maximum capacity(which is arbitrarily set at 256)..PThe program's behavior is subsequently undefined if the pointer ismoved outside of the 30000-byte array..SH AUTHORBrian Raiter.IR <breadbox@muppetlabs.com> .

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -