Coder Social home page Coder Social logo

gugadozero / asm64-tictactoe Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 17 KB

A tictactoe wrote in assembly 64 bits for linux

License: GNU General Public License v3.0

Assembly 100.00%
assembly assembly-language 64bit-assembly tictactoe-game tictactoe linux

asm64-tictactoe's Introduction

asm64-tictactoe

A tictactoe wrote in assembly 64 bits for linux

This an adaptation from a tictactoe game wrote in assembly 16 bits using DOS interruptions. Now a 64 bit assembly game using linux syscalls instead.

The original game: https://github.com/RobertoDebarba/tictactoe-8086

Build:

nasm -f elf64 tictactoe.asm

ld -o tictactoe tictactoe.o

Have fun!

asm64-tictactoe's People

Contributors

gugadozero avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

asm64-tictactoe's Issues

Dereferencing game_position_pointer leads to a segmentation fault

When an attempt to dereference the game_position_pointer is made, just like at this function:

update_draw:
    mov rbx, [game_position_pointer + rax]    
    mov rsi, player   
    cmp byte[rsi], "0"
    je draw_x
    
    cmp byte[rsi], "1"
    je draw_o
    
    draw_x:
        mov cl, "x"
        jmp update
        
    draw_o:
        mov cl, "o"
        jmp update
        
    update:
        mov [rbx], cl    <-  Here the problem
    
    ret

It lead us to a segmentation fault.

PS: The game_position_pointer is a quadword array that holds the address of each house of the board, but it seems that it loses all its addresses after the call to clear_screen function, so the failure.

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.