;z80
;assembler
;zx-spectrum


SEL_LEV DEFB      0
COORDX  DEFB      0
COORDY  DEFB      0
TAB1    DEFB      "SPSS M N B"
        DEFB      "EN L K J H"
        DEFB      " P O I U Y"
        DEFB      " 0 9 8 7 6"
        DEFB      " 1 2 3 4 5"
        DEFB      " Q W E R T"
        DEFB      " A S D F G"
        DEFB      "CS Z X C PE"
TAB_S1  DEFB      239,16,239,8,239,2,239,4,239,1
TAB_S2  DEFB      247,1,247,2,247,8,247,4,247,16
TAB_CUR DEFB      247,16,239,4,239,8,239,16,239,1
TABLE_K DEFB      223,2,223,1,251,1,253,1,127,4
TAB_ENG DEFB      "  MNB"
        DEFB      #0D,"LKJH"
        DEFB      "POIUY"
        DEFB      "09876"
        DEFB      "12345"
        DEFB      "QWERT"
        DEFB      "ASDFG"
        DEFB      " ZXCV"

TAB_SE  DEFB      "  .,*"
        DEFB      #0D,"=+-^"
        DEFB      #22,"; ]["
        DEFB      "_)('&"
        DEFB      "!@#$%"
        DEFB      "   <>"
        DEFB      "~|\"
        DEFB      " :`?/"

TAB_RUS DEFB      "  mnb"
        DEFB      #0D,"lkjh"
        DEFB      "poiuy"
        DEFB      "09876"
        DEFB      "12345"
        DEFB      "qwert"
        DEFB      "asdfg"
        DEFB      " zxcu"


;----------------------------------
TEXT1   DEFB      " SELECT CONTROL "
        DEFB      "  1.KEYBOARD    "
        DEFB      "  2.SINCLAIR    "
        DEFB      "  3.KEMPSTON J  "
        DEFB      "  4.KEMPSTON M  "
        DEFB      "  5.CURSOR      "
        DEFB      "  6.REDEFINE    "

TEXT2   DEFW      #5000
        DEFB      "  NO KEMPSTON   "
TEXT4   DEFW      #4800
        DEFB      "REDEFINE KEYS..."
L_TXT   DEFW      #4880
        DEFB      "    LEFT        "
R_TXT   DEFW      #48C0
        DEFB      "    RIGHT       "
U_TXT   DEFW      #5000
        DEFB      "    UP          "
D_TXT   DEFW      #5040
        DEFB      "    DOWN        "
F_TXT   DEFW      #5080
        DEFB      "    FIRE        "
K_TXT   DEFW      #4894
        DEFB      "  "

TEXT    DEFB      32,"     SELECT     "
TXT1    DEFB      24," 1.....CONTROLS "
TXT2    DEFB      20," 2....MUSIC YES "
TXT3    DEFB      16," 3..INSTRUCTION "
TXT4    DEFB      12," 4...START GAME "

NP      DEFB      " NO"
YP      DEFB      "YES"

;---------------------------------
BUF_T   DEFB      22,22,1
BUF_T1  DEFB      0,0,10,0,0,10,0,0,#FF
SCORE   DEFS      3
SCOR_YA DEFB      22,26,4
SC_YA   DEFB      0,0,0,#FF
SCOR_WR DEFB      22,26,6
SC_WR   DEFB      0,0,0,#FF

MANBUFF DEFS      120

        DEFS      10,16
BUF_I   DEFS      100
;----------------------------------------------
        DEFB      18,18,16,17,18,18,16,17,18,18
        DEFB      18,18,14,15,18,18,14,15,18,18
;----------------------------------------------
        DEFB      18,18,18,16,17,16,17,18,18,18
        DEFB      18,18,18,14,15,14,15,18,18,18
;----------------------------------------------
        DEFB      16,17,18,18,18,18,18,18,16,17
        DEFB      14,15,18,18,18,18,18,18,14,15
;----------------------------------------------
TAB_I   DEFB      1,1,2,3,4,4,4,5,8,1,0,255
TAB_J   DEFB      1,1,2,3,4,4,4,5,8,1,0,255
TAB_S   DEFB      1,2,3,4,5,6,7,8,9,10,11,12,20,21,0
TAB_K1  DEFB      1,1,2,3,4,4,4,5,8,1,6,1
TAB_K   DEFB      1,1,2,3,4,4,4,5,8,1,6,1

FIGHT   DEFB      "oba podohli, kak muhi w spirte !"
        DEFB      "razwed~ik naglo sovral marala !"
        DEFB      "flagu priel konec ...          "

        DEFB      "maralu ne powezlo:on minu nael"
        DEFB      "maral poimel razwed~ika        "
        DEFB      "soldat pOel maralu na zakusku "
        DEFB      "maral sapera s'el slu~aino ... "
        DEFB      "servant maralu na zubok popal !"
        DEFB      "lejtenanta maral zagasil       "
        DEFB      "kapitana zapinal maral         "
        DEFB      "majora scapal maral i prirezal "
        DEFB      "zarezal polkownika maral       "
        DEFB      "general na marala narwalsq ... "

        DEFB      "general zwerski podorwan !      "
        DEFB      "razwed~ik generaloM kon~en      "
        DEFB      "general podstrelil soldata      "
        DEFB      "saper tak i sdoh na generale    "
        DEFB      "servanta general slowil         "
        DEFB      "lejtenanta general trahnul !    "
        DEFB      "kapitana stuknul general !      "
        DEFB      "major, bednqga generala nael ! "
        DEFB      "general bednogo polkownika ubil "

        DEFB      "polkownik prqmo na mine i podoh "
        DEFB      "razwed~ika ubil polkownik ...   "
        DEFB      "polkowniK otygralsq na soldate !"
        DEFB      "polkownik otomstil saperu       "
        DEFB      "polkownik zavewal servanta      "
        DEFB      "lejtananta polkownik poimel     "
        DEFB      "kapitan FUCKED BY polkownik     "
        DEFB      "polkownik majora ukokoil       "

        DEFB      "major tupo skon~alsq na mine ..."
        DEFB      "major priib razwed~ika         "
        DEFB      "major dobil soldata             "
        DEFB      "major dal w mordu saperu        "
        DEFB      "servant podoh pod majorom       "
        DEFB      "major poimel w vopu lejtenanta  "
        DEFB      "major ottrahal kapitana         "

        DEFB      "kapitan kon~il na minu i podoh  "
        DEFB      "kapitan kruto zamo~il razwed~ika"
        DEFB      "kapitan otimel soldata          "
        DEFB      "kapitan bezvalostno ubil sapera "
        DEFB      "kapitan podstrelil servanta     "
        DEFB      "kapitan trahnul lejtenanta      "

        DEFB      "lejtanant podorwalsq            "
        DEFB      "lejtanant KILLED razwed~ika     "
        DEFB      "lejtanant razobralsq s soldatom "
        DEFB      "lejtanant otformatirowal sapera "
        DEFB      "lejtanant udalil servanta       "

        DEFB      "servant nael minu. |TO ploho!!!"
        DEFB      "servant trqhanul sapera         "
        DEFB      "servant zwezdanul soldata       "
        DEFB      "servant zamo~il razwed~ika      "

        DEFB      "saper minu s'el i ne podawilsq !"
        DEFB      "saper zagryz soldata nasmertx   "
        DEFB      "razwed~ika naglo sovral saper   "

        DEFB      "soldat baka mina upadet !      "
        DEFB      "soldat razwed~ika kruto sdelal !"

        DEFB      "razwed~ik podorwalsq ! WOOOOOW !"

GAMO_TX DEFB      "uwy, wam ne powezlo. konec igry."
VIC_TXT DEFB      "pobeda, ura-a-a-a!!!            "

FIGHT1  DEFB      22,0,23
        DEFS      32
        DEFB      0

SPACE   DEFB      22,0,23
        DEFS      32,32
        DEFB      0

FIGHT_T DEFW      FIGHT+96        ;maral
        DEFW      FIGHT+128
        DEFW      FIGHT+160
        DEFW      FIGHT+192
        DEFW      FIGHT+224
        DEFW      FIGHT+256
        DEFW      FIGHT+288
        DEFW      FIGHT+320
        DEFW      FIGHT+352
        DEFW      FIGHT+384

        DEFW      FIGHT+416       ;general
        DEFW      FIGHT+448
        DEFW      FIGHT+480
        DEFW      FIGHT+512
        DEFW      FIGHT+544
        DEFW      FIGHT+576
        DEFW      FIGHT+608
        DEFW      FIGHT+640
        DEFW      FIGHT+672
        DEFW      0

        DEFW      FIGHT+704       ;polkownik
        DEFW      FIGHT+736
        DEFW      FIGHT+768
        DEFW      FIGHT+800
        DEFW      FIGHT+832
        DEFW      FIGHT+864
        DEFW      FIGHT+896
        DEFW      FIGHT+928
        DEFS      4

        DEFW      FIGHT+960       ;major
        DEFW      FIGHT+992
        DEFW      FIGHT+1024
        DEFW      FIGHT+1056
        DEFW      FIGHT+1088
        DEFW      FIGHT+1120
        DEFW      FIGHT+1152
        DEFS      6

        DEFW      FIGHT+1184      ;kapitan
        DEFW      FIGHT+1216
        DEFW      FIGHT+1248
        DEFW      FIGHT+1280
        DEFW      FIGHT+1312
        DEFW      FIGHT+1344
        DEFS      8

        DEFW      FIGHT+1376      ;lejtenant
        DEFW      FIGHT+1408
        DEFW      FIGHT+1440
        DEFW      FIGHT+1472
        DEFW      FIGHT+1504
        DEFS      10

        DEFW      FIGHT+1536      ;servant
        DEFW      FIGHT+1568
        DEFW      FIGHT+1600
        DEFW      FIGHT+1632
        DEFS      12

        DEFW      FIGHT+1664      ;saper
        DEFW      FIGHT+1696
        DEFW      FIGHT+1728
        DEFS      14

        DEFW      FIGHT+1760      ;soldat
        DEFW      FIGHT+1792
        DEFS      16

        DEFW      FIGHT+1824      ;razwed~ik
        DEFS      18
        DEFW      FIGHT+32

BUFER   EQU     61440           ;48
BUFER2  EQU     BUFER+48        ;336
BUFER3  EQU     BUFER2+336      ;48
BUFER4  EQU     BUFER3+48       ;48
BUFER5  EQU     BUFER4+48       ;336
BUFER6  EQU     BUFER5+336      ;48
BUFER7  EQU     BUFER6+48       ;336
BUFER8  EQU     BUFER7+336      ;48
BUFER9  EQU     BUFER8+48       ;336
BUFER10 EQU     BUFER9+336      ;384

BUF_W   EQU     BUFER10+384
BUF_W1  EQU     BUF_W+512

COORX   EQU     3
COORY   EQU     16

ZAST    EQU     49152
SCR_LEV EQU     52799
SADDAM  EQU     57406
CREDIT  EQU     52174


