Find Jobs
Hire Freelancers

Assembly language code

$10-30 USD

Cancelled
Posted about 6 years ago

$10-30 USD

Paid on delivery
Tic Tac Toe Game .data currentState: .asciiz "This is the current state of the GameBoard:\n" playerOne: .asciiz "Player One won\n" playerTwo: .asciiz "Player Two won\n" playerNone: .asciiz "No winners found\n" enterMove: .asciiz "\nEnter a board position (0-8) to make move:\n" invalidMove: .asciiz "\nInvalid move - try again.\n" CR: .byte '\n SPACE: .byte 0x20 O: .byte 'o X: .byte 'x DOT .byte '. player: .byte 0x01 gameBoard: .byte 0,0,0,0,0,0,0,0,0 # fresh clean empty gameboard .code .globl main ########################################################################## # CheckTriplet # Check the gameboard positions matching the triplet passed in # to determine either player has won that specific triplet. # # Input: # $a0 : first position to check on gameboard # $a1 : second position to check on gameboard # $a2 : third position to check on gameboard # # Output: # $v0 : 0 = no winner found # $v0 : 1 = player one won # $v0 : -1 = player two won # AS WELL AS an appropriate message if player one or player two has won # ########################################################################## CheckTriplet: # COPY YOUR PAST IMPLEMENTATION HERE ########################################################################## # CheckForWin # Invoke CheckTriplet against the 8 possible winning combinations # to determine if anyone has won the game yet # row 0 # row 1 # row 2 # col 0 # col 1 # col 2 # diagonal 0 # diagonal 1 # # Output: # $v0 : 0 = no winner found # $v0 : 1 = player one won # $v0 : -1 = player two won ########################################################################## CheckForWin: # COPY YOUR PAST IMPLEMENTATION HERE ########################################################################## # PRINTBOARD ########################################################################## PrintBoard: # COPY YOUR PAST IMPLEMENTATION HERE ########################################################################## # RequestMove # # ToDo: # return $v0 = player's choice to move to that is valid # ########################################################################## RequestMove: # COPY YOUR PAST IMPLEMENTATION HERE ########################################################################## # CheckForMoreMoves # # ToDo: # return $v0 = 0 if no more moves left on gameBoard # return $v0 = 1 if yes there are more moves left on gameBoard # ########################################################################## CheckForMoreMoves: # COPY YOUR PAST IMPLEMENTATION HERE ########################################################################## # TOGGLEPLAYER ########################################################################## TogglePlayer: lb $t0,player sub $t0,$zero,$t0 sb $t0,player jr $ra # return from function call ########################################################################## # MAIN ########################################################################## main: # Print the board # request the move # apply the move to the board & toggle player # check for win # check for more moves # loop until win or draw # if no winners found, say so and exit # print the board one last time before exiting # exit
Project ID: 16333840

About the project

1 proposal
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
1 freelancer is bidding on average $20 USD for this job
User Avatar
Sir I have vast experience in assembly language,u can view my profile and complete on time.I am a full time freelancer, working for more than 2 years now. Have clients from different parts of the world.
$20 USD in 1 day
4.6 (19 reviews)
4.4
4.4

About the client

Flag of UNITED STATES
United States
0.0
0
Payment method verified
Member since Feb 17, 2018

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.