diff options
| author | la-ninpre <leobrekalini@gmail.com> | 2022-07-07 22:20:48 +0300 |
|---|---|---|
| committer | la-ninpre <leobrekalini@gmail.com> | 2022-07-07 22:20:48 +0300 |
| commit | 06dd1c018105a2614133ea56f3d888a633c6d14c (patch) | |
| tree | 778a91fd8776da48d99349d8e3cf0cd30182a321 | |
| parent | fbe9cf3de729a186a7f6365ed2930c4073f8c149 (diff) | |
| download | tictactoe-06dd1c018105a2614133ea56f3d888a633c6d14c.tar.gz tictactoe-06dd1c018105a2614133ea56f3d888a633c6d14c.zip | |
apply optimizations
add lint to makefile
| -rw-r--r-- | Makefile | 21 | ||||
| -rw-r--r-- | tictactoe.tal | 5 |
2 files changed, 16 insertions, 10 deletions
@@ -1,21 +1,28 @@ SRC = tictactoe.tal -OBJ = $(SRC:.tal=.rom) +PROG = $(SRC:.tal=.rom) -CLEANFILES = $(OBJ) +CLEANFILES = $(PROG) -UXNASM = uxncli ~/roms/drifblim.rom +UXNASM = uxncli ~/roms/asma.rom +# UXNASM = uxncli ~/roms/drifblim.rom # UXNASM = uxnasm -all: $(OBJ) +UXNEMU = uxnemu +# UXNEMU = uxn11 + +all: $(PROG) .tal.rom: $(UXNASM) $< $@ -$(OBJ): $(SRC) +$(PROG): $(SRC) + +run: $(PROG) + $(UXNEMU) $< -run: $(OBJ) - uxnemu -s 3 $< +lint: $(SRC) + uxncli ~/roms/uxnlin.rom $< clean: rm -f $(CLEANFILES) diff --git a/tictactoe.tal b/tictactoe.tal index 14aa1ed..ad8388e 100644 --- a/tictactoe.tal +++ b/tictactoe.tal @@ -268,7 +268,6 @@ JMP2r ;o .Screen/addr DEO2 #03 .Screen/sprite DEO #01 .game/current-player STZ ( very evil ) - JMP2r JMP2r @draw-endgame ( winstate -- ) @@ -300,10 +299,10 @@ JMP2r @pos-to-xy ( pos -- x* y* ) #04 SFTk NIP #03 AND - #01 ADD #00 SWP #0010 MUL2 + INC #00 SWP #40 SFT2 ROT #03 AND - #01 ADD #00 SWP #0010 MUL2 + INC #00 SWP #40 SFT2 JMP2r @pos-to-addr ( pos -- addr ) |
