Why is the XOR operation not toggling the player variable in my x86 assembly tic-tac-toe game?
I am working on a text based tic-tac-toe game for some users, using x86 assembly on an Intel Core i7 12700K systems running Ubuntu 22.04. I'm using NASM assembler and GNU Linker for development.
I am beginning to have an issue with the
change_player
function. The code attempts to toggle the player variable between "0" and "1" using XOR, but the value remains unchanged.
What is causing the player variable to not be modified as expected?
Are there any issues with memory access or data manipulation in the change_player function?
What are the recommended approaches for managing player turns please ?
https://github.com/Marveeamasi/Tricky-tac-toey/blob/main/assembly/game.asmGitHub
Tricky-tac-toey/assembly/game.asm at main · Marveeamasi/Tricky-tac-...
Tic-tac-toe game built with low level , for performance optimization - Marveeamasi/Tricky-tac-toey
2 Replies
there's a segmentation fault in this line from label update_draw:
I can't get what i am doing wrong
I have edited the code adding and committed it , but strangely, I've found out that the
change_player
label isn't changing anything, in fact it looks like that my entire code is not modifying the variables of the section data.
Does not change the variable player, the value is always 0