Coder Social home page Coder Social logo

gusar1t0 / asm-simpleoperations Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 45 KB

Two small tasks on NASM for macOS (x64) and C/C++/C# languages

Assembly 33.33% C 15.46% C++ 15.79% C# 14.93% Shell 20.49%
assembly nasm macos x64 c cpp csharp statistics llvm clang matrix strings

asm-simpleoperations's Introduction

ASM-SimpleOperations

Assembly - Simple Operations

Tasks

  1. Matrix: determine the line numbers, the arithmetic average of elements that are less than the specified value.
  2. String: replace all zeros with ones in the text, and ones with zeros, starting from the position in which the number of preceding ones exceeds the number of preceding zeros by 1.

Launcher

Arguments

$> cd scripts/
$scripts> ./launcher.sh (nasm|c|cpp|csharp) (matrix|string) [-p]
  • ./launcher.sh - launcher script in repository root
  • (nasm|c|cpp|csharp) - available languages
  • (matrix|string) - implemented tasks
  • [-p] - optional, using prepared data

Languages

  1. NASM for macOS x64 (gcc)
  2. C language (clang/LLVM)
  3. C++ language (clang++/LLVM)
  4. C# language for macOS w/ Mono Framework (csc)

Statistics

Arguments

$> cd scripts/
$scripts> ./stats.sh
  • ./stats.sh - statistics script in repository root

Results of statistics

All results of statistics are located into scripts/verdicts folder.

Example of work

$scripts> ./launcher.sh <LAUNGUAGE> matrix
Count of matrix rows: 5
Count of matrix cols: 5

Matrix (size = 5x5, total = 25):
	93	17	57	11	58
	73	86	76	2	18
	55	45	5	38	77
	6	81	10	59	29
	50	19	35	49	33

Row average values:
	1 -> 47
	2 -> 51
	3 -> 44
	4 -> 37
	5 -> 37

Number for average values comparison: 45

Rows comply the condition:
	3 -> 44
	4 -> 37
	5 -> 37

$scripts> ./launcher.sh <LAUNGUAGE> string
Enter the original string:
hf93300--11111

The reworked string:
hf93300--11100

$scripts> ./stats.sh
Processing to verdicts/nasm.matrix.20190529_001355.txt
Processing to verdicts/nasm.string.20190529_001355.txt
Processing to verdicts/c.matrix.20190529_001355.txt
Processing to verdicts/c.string.20190529_001355.txt
Processing to verdicts/cpp.matrix.20190529_001355.txt
Processing to verdicts/cpp.string.20190529_001355.txt
Processing to verdicts/csharp.matrix.20190529_001355.txt
Processing to verdicts/csharp.string.20190529_001355.txt
Done!

asm-simpleoperations's People

Contributors

gusar1t0 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.