Skip to content

Implement several methods similar to the string.h in assembly

Notifications You must be signed in to change notification settings

tomershlasky/String-Assembly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assembly Exercise Project:

  1. Introduction
  2. main.s:
  3. Dependencies:

Introduction

An exercise in computer structure course, we were given a task to implement several methods similar to the string.h, as-

  • char pstrlen(Pstring* pstr) - get the length of pstring
  • Pstring* replaceChar(Pstring* pstr, char oldChar, char newChar) - replace all the oldChar with new char in pstring
  • Pstring* pstrijcpy(Pstring* dst, Pstring* src, char i, char j) - copy src[i:j] to dst[i:j]
  • Pstring* swapCase(Pstring* pstr) - replace every A to a, a to A and so on..
  • int pstrijcmp(Pstring* pstr1, Pstring* pstr2, char i, char j) - compare between src[i:j] to dst[i:j]

main.s:

Getting an int from the user- length of the first "pstring" (n1), then getting n1 chars (without "\n") for the first pstirng. Than doing the same procces for the 2nd pstring. getting a number from the user (50-55) and run one of the functions above using switch case.

Dependencies:

  • MacOS / Linux
  • SASM / NASM
  • Git

About

Implement several methods similar to the string.h in assembly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published