Skip to content

Commit

Permalink
goodbye.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathis committed Jan 26, 2022
1 parent b77b9b9 commit b56603d
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 181 deletions.
74 changes: 29 additions & 45 deletions comp/ex1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ STORE 0
DUPN 1
PUSHA Couleur_4_name
STORE 1
ALLOC 0
ALLOC 12
DUPN 1
PUSHA Point_4_egal
Expand Down Expand Up @@ -145,6 +146,7 @@ STORE 10
DUPN 1
PUSHA DefaultPoint_7_couleur
STORE 11
ALLOC 0
-- ----- STATIC ATTRIBS -----
PUSHN 4
-- ----- MAIN INSTRUCTION -----
Expand Down Expand Up @@ -591,28 +593,23 @@ STOP
_CTOR_Point_: NOP
PUSHN 0
PUSHL -4
LOAD 4
PUSHL -3
STORE 3
STORE 4
PUSHL -4
LOAD 5
PUSHL -2
STORE 4
STORE 5
PUSHL -4
LOAD 6
PUSHL -1
STORE 5
STORE 6
PUSHL -4
LOAD 2
PUSHI 0
PUSHA Point_4_incr
CALL
POPN 0
STORE 1
STORE 2
PUSHL -4
LOAD 3
PUSHI 0
STORE 2
STORE 3
POPN 0
RETURN
Point_4_egal: NOP
Expand Down Expand Up @@ -690,7 +687,6 @@ PUSHI 1
EQUAL
POPN 1
PUSHL -1
LOAD 1
ALLOC 7
DUPN 1
PUSHG 0
Expand All @@ -706,7 +702,7 @@ CONCAT
PUSHA _CTOR_Point_
CALL
POPN 3
STORE 0
STORE 1
PUSHL -1
LOAD 1
STOREL -2
Expand Down Expand Up @@ -755,19 +751,17 @@ RETURN
Point_4_move: NOP
PUSHN 0
PUSHL -1
LOAD 4
PUSHL -1
LOAD 4
PUSHL -4
ADD
STORE 3
STORE 4
PUSHL -1
LOAD 5
PUSHL -1
LOAD 5
PUSHL -3
ADD
STORE 4
STORE 5
PUSHL -2
JZ lbl9
PUSHN 0
Expand Down Expand Up @@ -801,9 +795,8 @@ RETURN
Point_7_setName: NOP
PUSHN 0
PUSHL -1
LOAD 6
PUSHL -2
STORE 5
STORE 6
POPN 0
RETURN
Point_4_gety: NOP
Expand All @@ -818,41 +811,37 @@ STOREL -2
RETURN
Point_4_init: NOP
PUSHN 0
PUSHG 0
PUSHI 0
STORE 0
STOREG 7
POPN 0
RETURN
Point_7_howMany: NOP
PUSHG 0
PUSHG 7
STOREL -1
RETURN
Point_4_incr: NOP
PUSHN 0
PUSHG 0
PUSHG 0
PUSHG 7
PUSHI 1
ADD
STORE 0
PUSHG 0
STOREG 7
PUSHG 7
STOREL -1
POPN 0
RETURN
_CTOR_Couleur_: NOP
PUSHN 0
PUSHL -2
LOAD 1
PUSHL -1
STORE 0
STORE 1
PUSHL -2
LOAD 1
PUSHI 0
INF
JZ lbl11
PUSHL -2
LOAD 1
PUSHI 0
STORE 0
STORE 1
JUMP lbl12
lbl11: NOP
PUSHL -2
Expand All @@ -861,9 +850,8 @@ PUSHI 2
SUP
JZ lbl13
PUSHL -2
LOAD 1
PUSHI 0
STORE 0
STORE 1
JUMP lbl14
lbl13: NOP
PUSHN 0
Expand Down Expand Up @@ -939,20 +927,19 @@ PUSHN 0
POPN 0
RETURN
CouleurFactory_4_gris: NOP
PUSHG 3
PUSHG 10
STOREL -1
RETURN
CouleurFactory_4_noir: NOP
PUSHG 2
PUSHG 9
STOREL -1
RETURN
CouleurFactory_5_blanc: NOP
PUSHG 1
PUSHG 8
STOREL -1
RETURN
CouleurFactory_4_init: NOP
PUSHN 0
PUSHG 1
ALLOC 2
DUPN 1
PUSHG 1
Expand All @@ -961,8 +948,7 @@ PUSHI 0
PUSHA _CTOR_Couleur_
CALL
POPN 1
STORE 1
PUSHG 2
STOREG 8
ALLOC 2
DUPN 1
PUSHG 1
Expand All @@ -971,8 +957,7 @@ PUSHI 1
PUSHA _CTOR_Couleur_
CALL
POPN 1
STORE 2
PUSHG 3
STOREG 9
ALLOC 2
DUPN 1
PUSHG 1
Expand All @@ -981,10 +966,11 @@ PUSHI 2
PUSHA _CTOR_Couleur_
CALL
POPN 1
STORE 3
STOREG 10
POPN 0
RETURN
_CTOR_PointColore_: NOP
PUSHL -4
PUSHL -3
PUSHL -2
PUSHS "P-"
Expand All @@ -994,15 +980,13 @@ CALL
POPN 0
STR
CONCAT
PUSHL -4
PUSHA _CTOR_Point_
CALL
POPN 4
PUSHN 0
PUSHL -4
LOAD 7
PUSHL -1
STORE 6
STORE 7
POPN 0
RETURN
PointColore_5_print: NOP
Expand Down Expand Up @@ -1095,13 +1079,13 @@ LOAD 7
STOREL -2
RETURN
_CTOR_PointNoir_: NOP
PUSHL -3
PUSHL -2
PUSHL -1
PUSHI 0
PUSHA CouleurFactory_4_noir
CALL
POPN 0
PUSHL -3
PUSHA _CTOR_PointColore_
CALL
POPN 4
Expand All @@ -1124,13 +1108,13 @@ PUSHI 0
STOREL -2
RETURN
_CTOR_DefaultPoint_: NOP
PUSHL -1
PUSHI 0
PUSHI 0
PUSHI 0
PUSHA CouleurFactory_5_blanc
CALL
POPN 0
PUSHL -1
PUSHA _CTOR_PointColore_
CALL
POPN 4
Expand Down
Loading

0 comments on commit b56603d

Please sign in to comment.