{"id":15060058,"url":"https://github.com/titi-rex/libasm","last_synced_at":"2026-01-02T06:37:22.788Z","repository":{"id":254143039,"uuid":"843457356","full_name":"titi-rex/libasm","owner":"titi-rex","description":"42 project libasm","archived":false,"fork":false,"pushed_at":"2024-09-17T13:25:03.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T19:48:58.727Z","etag":null,"topics":["42projects","assembly"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/titi-rex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-16T14:57:32.000Z","updated_at":"2024-09-17T13:25:06.000Z","dependencies_parsed_at":"2024-09-06T03:36:43.654Z","dependency_job_id":null,"html_url":"https://github.com/titi-rex/libasm","commit_stats":null,"previous_names":["titi-rex/libasm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titi-rex%2Flibasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titi-rex%2Flibasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titi-rex%2Flibasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titi-rex%2Flibasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/titi-rex","download_url":"https://codeload.github.com/titi-rex/libasm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681084,"owners_count":20330155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42projects","assembly"],"created_at":"2024-09-24T22:51:56.858Z","updated_at":"2026-01-02T06:37:22.746Z","avatar_url":"https://github.com/titi-rex.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Libasm\n\nAn introduction project to assembly\n\nThe goals is to rewrite somes functions in pure 64 bits ASM \n\n# Requirements\n- use Intel syntax\n- 64 bits assembly\n- use nasm as compiler\n- no inline asm (do `.s` files)\n- forbidden to use `-no-pie` compilation flag\n- library must be called libasm.a\n- a test main should be present\n- check for error after syscall and set errno properly (use of `___error` or `errno_location`)\n\n# Mandatory\nEach functions should behave the same as their libc counterpart (see man 3 and man 2 for read/write)\n\nCall to malloc authorized for strdup\n\n```c\nsize_t  ft_strlen(const char *s);\nchar *  ft_strcpy(char *restrict dst, const char *restrict src);\nint     ft_strcmp(const char *s1, const char *s2);\nchar *  ft_strdup(const char *s);\nssize_t ft_write(int fd, const void* buf, size_t count);\nssize_t ft_read(int fd, void* buf, size_t count);\n```\n\n\n# Bonus\nStruct used for ft_list_* :\n```c\ntypedef struct s_list\n{\n    void            *data;\n    struct s_list   *next;\n}   t_list;\n```\nTheses functions should behave the same as the one from piscine (day04 and day12)\n\n```c\nint     ft_atoi_base(char *str, char *base);\n\nt_list *ft_create_elem(void *data);\nvoid    ft_list_push_front(t_list **begin_list, void *data);\nint     ft_list_size(t_list *begin_list);\nvoid    ft_list_sort(t_list **begin_list, int (*cmp)());\nvoid    ft_list_remove_if(t_list **begin_list, void *data_ref, int (*cmp)(), void (*free_fct)(void *));\n```\n\n\n## Tests\n\nInsteed of a simple test main, tests are done using [LeadWasp](https://github.com/titi-rex/leadwasp_libasm_tester) which is not included in this repo\n\n\n\n## References\n\n- [Hello world in 64-bits ASM](https://p403n1x87.github.io/getting-started-with-x86-64-assembly-on-linux.html)\n\n- [Good concrete introduction in 32-bits ASM + notions about stack](https://beta.hackndo.com/assembly-basics/)\n\n- [Good asm introduction in 32-bits ASM (x86_32)](https://web.archive.org/web/20120822144129/http://www.cin.ufpe.br/%7Eif817/arquivos/asmtut/index.html)\n\n\n- [Excellent short introduction on 64-bits ASM (x86_64)](https://aaronbloomfield.github.io/pdr/book/x86-64bit-asm-chapter.pdf)\n\n- [Excellent explanation of the 'Calling Convention'](https://aaronbloomfield.github.io/pdr/book/x86-64bit-ccc-chapter.pdf)\n\n\n- [Some history about registers names](https://www.crockford.com/x64.html)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiti-rex%2Flibasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiti-rex%2Flibasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiti-rex%2Flibasm/lists"}