Skip to content

Gavinmpaw/Assembly-Playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assembly-Playground

A repo for random assembly stuff I write

uses linux x86_64 system calls


hello_world.asm

  • mostly self describing... prints "Hello world"
  • testing/box.asm

  • prints a small box to the screen (done as an early step in learning looping
  • testing/dynamicBox.asm

    • also prints a small box, but with some adjustments
      • now uses mmap syscall to create space in memory
      • then constructs the box in this memory space based on x and y values defined in the data section
      • prints the box from memory
  • done to learn how memory allocation works in assembly
  • never actually bothers to de-allocate the memory
  • testing/numberInput.asm

    • reads a single digit from stdin, then prints it out a number of times equal to the digits value
    • precursor to the more complex number conversion file tests
    • also done to play around with stdin a bit

    testing/multiDigitIntegerFromString.asm

  • converts a string defined in the data section into an integer value then prints the character # a number of times equal to the value of the integer
  • testing/multiDigitIntegerToString.asm

    • the reverse of the above, converts a 64 bit integer into a string and prints it
    • does not however use the data section... as I was also using it to experiment with using the stack for temporary variable storage

    testing/userInput.asm

    • contains two subroutines that read user input into a buffer provided by the caller
    • read_string - reads characters until either a maximum length, or a newline. whichever comes first
    • read_line - reads characters to the end of the line, discards anything beyond the buffer length
    • Both will 0 terminate the string in the buffer

    basically_stdio.asm

  • IO subroutines meant to allow easy IO without using the C standard libraries
    • basically_printf

      Expects arguments in rdi, rsi, rdx, rcx, r8, r9 and any further on the stack ,currently supports %d for integers, %s for strings, and %n for newline

    About

    A repo for random assembly stuff I write

    Topics

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published