Skip to content
/ cp-asm Public

An (hopefully) ELF x86-64 ABI compliant asm library for competitive programming on linux

License

Notifications You must be signed in to change notification settings

eliasol/cp-asm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Competitive Programming ASM

This library is just a fun project and hence has no real goal.
It is intended to be used as a base to write solutions to competitive programming problems in assembly.
The only supported assembler is NASM.

Since most online judges only allow a single file for a submission, even if the library is itself split into multiple files, they are not meant to be assembled separately and then linked together. They are, instead, meant to be included, and for this reason each symbol is prefixed with its module name to prevent unwanted conflicts.

While it is possible to copy and paste parts of the library in the solution file, the recommended way to produce a single file for the submission is to run the preprocessor only, to resolve the includes.
Note that this actually has some drawbacks, but should be fine most of the times.
Also the src directory should be added to the assembler's include path.

The recommended way to produce the file to submit is:

nasm -e -I/path/to/library/src/ solution.asm

Please note that the trailing slash in the include path is required as per nasm specification.

About

An (hopefully) ELF x86-64 ABI compliant asm library for competitive programming on linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published