Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vrom911/asm
Assembly task
https://github.com/vrom911/asm
assembly binary-search mergesort nasm nasm-assembly
Last synced: about 1 month ago
JSON representation
Assembly task
- Host: GitHub
- URL: https://github.com/vrom911/asm
- Owner: vrom911
- License: mit
- Created: 2017-11-27T16:34:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-11T14:29:47.000Z (about 7 years ago)
- Last Synced: 2024-11-10T17:02:44.717Z (3 months ago)
- Topics: assembly, binary-search, mergesort, nasm, nasm-assembly
- Language: Assembly
- Size: 43.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Task description
The program `task` accepts the pairs of words `A B` from file `input.txt`, makes a merge sort,
and then let you find by `A` (inputed from `stdin`) the `B` with the help of binary search.## Usage
To run the task you can use the following command
```bash
$ make
```
then you'll be asked to enter the key. If the corresponding value is found it would be printed in the output, if it's not — the error message will appear, after the response you'll be able to continue making key-queries.Here is example of work:
```bash
$ make
Enter the key: jj
val5
Enter the key:Enter the key: jk
Key wasn't found: jk
Enter the key:
...```
## Errors handling
The program reports about errors. It could be one of the following situation:
* The file `input.txt` doesn't exist
* The file `input.txt` is empty
* The file parsing errors — right file format: each line should contain the key followed by one space and the value after it. Example:
```
K1 V1
K2 V2
```
* The corresponding key was not found