Tic-Tac-Toe Over Network Using Simple ASM Simulator

From few years ago, when i was new in space technology program, our instructors gave us a report.

In this report we must develop a Tic-Tac-Toe using ASM Simulator, and this simulator we must develop it too.

Our instructors helped us a little in how we can develop a simple ASM Simulator, and left us to continue developing the game and ASM simulator and they made it worst when they asked it to be Over Network.

My Team consist of 2 people (Me and Islam My Friend), and the report deadline was 2 weeks.

After we studied the topic and the implementation with HLL (High Level Languages), we started to implement it with our custom ASM we defined in the simulator.

The game in first was a console app, but after while before we deliver it we decided to implement UI on it and we used the GTK++ to develop the simple interface.

In this article i will share the source code of the game + simulator under console and with the network support.

To Download The Core.c of The Game and Simulator Click Here.

The Simulator Features:

  • Simple Support for Labels and jumping to it like (jnz, jz, jmp, je, jg, jng, call, etc).
  • Network send and receiver instructions (bind, send, receive, clos, etc).
  • Support the regular ASM AL instructions like (add, sub, mul, div, not, etc).
  • Support the regular ASM registers and memory instruction like (mov, set, fmov, fset, etc).
  • Support console instructions (inpt, xlat, delay, prnt, etc).
  • Simple support of segmentation like (code segment, data segment).

How Can You Use It?

  • In assignments too :D, cause your students will understand how the ASM work in low level, like us really we learned the ASM better from this example (how we can declare the instructions, parse ASM code and how the machine execute it) then using the real simulators we used in college like 8086 ASM Simulator.
  • Develop VM in University Compiler Projects, to execute the output file which your compiler generate after the phases of compilation.

My source is simple idea but can help you to develop what i just mentioned before, in fact i used this idea in my University Compiler Project too to develop VM for my c compiler output like in JavaVM.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: