نمایش نتایج: از شماره 1 تا 1 از مجموع 1
  1. #1
    بنیانگذار
    تاریخ عضویت
    2010 January
    محل سکونت
    زیر سایه خدا
    سن
    37
    ارسال ها
    1,308
    تشکر
    2,923
    تشکر شده 2,205 بار در 886 پست
    نوشته های وبلاگ
    37


    آيا اين پست براي شما سودمند بود؟ بله | خیر

    بازی مار در اسمبلی - Snake Game in Assembly ( گرافیکی - کنسولی و ورژن Emu8086 )

    سلام .
    اینجا سه سورس کد مختلف از بازی مار یا همون Snake رو در اسمبلی براتون قرار میدم .
    ورژن اول اون بازی بصورت گرافیکی هست و ورژن های بعدی بصورت کنسولی . از ورژنهای کنسولی ( یا بهتر بگم غیر گرافیکی ) یکی مخصوص emu8086 هست و یکی دیگه هم با Masm قابل کامپایل هست .
    در انتها هم میتونید کل پروژه رو دنلود کنید .
    برنامه اول :

    ;________IN THE NAME OF GOD___________
    ;Dos Graphical Snake game in Assembly
    ;Snake Game in Assembly
    ;Ustmb.ir
    ;Feb 18 2012 6:56 Pm
    ;_____________________________________
    escape equ 01h ;scan code
    up equ 48h
    down equ 50h
    right equ 4dh
    left equ 4bh
    data segment
    speed db 70,55,40,25,10 ;speed of game
    level db 0
    color db 0
    msg db 'Nibbling Snake Ver1.0',0ah,0dh
    db ' 1.Easier',0ah,0dh
    db ' 2.Easy',0ah,0dh
    db ' 3.Normal',0ah,0dh
    db ' 4.Hard',0ah,0dh
    db ' 5.Harder',0ah,0dh
    db 'Choose your level:','$'
    sx db 200 dup(0) ;position of snake
    sy db 200 dup(0)
    fx db 0 ;position of food
    fy db 0
    x db 20 ;position of temparary head of snake
    y db 20
    d db right ;direction
    dtemp db right ;temparary direction
    ls db 4 ;length of the snake
    lord db 1 ;living of dead
    N1 DB 29
    N2 DB 217
    N3 DB 40
    SEED DB 0 ;random number
    data ends
    code segment
    assume cs:code,ds:data
    go:
    mov ax,data ;load data segment
    mov ds,ax
    mov ah,0 ;clear screen
    mov al,4
    int 10h
    mov ah,0
    mov al,3
    int 10h
    mov ah,9 ;output messege
    mov dx,offset msg
    int 21h
    mov ah,1 ;input level
    int 21h
    mov level,al
    sub level,30h
    mov ah,0 ;screen mode:320*200*4
    mov al,4
    int 10h
    mov ah,0bh ;No.0 color panel
    mov bh,1
    mov bl,0
    int 10h
    mov bh,0 ;black background
    int 10h
    mov sx[1],20 ;initial four node
    mov sy[1],17
    mov sx[2],20
    mov sy[2],18
    mov sx[3],20
    mov sy[3],19
    mov sx[4],20
    mov sy[4],20
    mov dx,4
    mov cx,4
    ground: ;draw red background
    mov ah,0ch ;(4,4)->(163,163)
    mov al,2
    int 10h
    inc cx
    cmp cx,164
    jne ground
    mov cx,4
    inc dx
    cmp dx,164
    jne ground
    newfood:
    mov ah,0 ;read the time of system
    int 1ah
    mov seed,dl ;move to seed
    call food ;draw new food
    call score ;output score
    direct:
    call direction ;get new direction
    call liveordie ;judge whether the snake is living or dead
    cmp lord,0 ;if lord==0,game over
    je quit
    draw:
    mov bl,4 ;push position of new head into stack
    mov al,x
    mul bl
    push ax
    mov al,y
    mul bl
    push ax
    mov color,1 ;green color
    call pix ;draw new snake head
    mov ah,0 ;judge whether snake has eaten food
    mov al,fx
    cmp x,al
    jne tail ;no,go to erase tail
    mov al,fy
    cmp y,al
    je inclength ;yes,go to increase length
    tail:
    call newsnake ;modify every node of the snake,erase tail
    call delay ;keep screen for some time
    jmp direct ;get next direction
    inclength:
    inc ls ;increase length
    lea si,sx ;load effective address of position
    lea di,sy
    mov ah,0
    mov al,ls
    add si,ax
    add di,ax
    mov al,x ;move new position to new head
    mov [si],al
    mov al,y
    mov [di],al
    call delay ;keep screen for some time
    jmp newfood ;go to crease new food
    quit:
    mov ah,1 ;press any key to exit
    int 21h
    mov ah,0 ;screen mode:text
    mov al,3
    int 10h
    mov ah,4ch
    int 21h
    pix proc near ;two parameters
    push bp ;save bp,ax,bx,cx,dx
    push ax
    push bx
    push cx
    push dx
    mov bp,sp ;get parameter from stack
    mov dx,[bp+14]
    mov cx,[bp+12]
    line: ;draw a 4*4 square
    mov ah,0ch
    mov al,color ;color
    int 10h
    inc cx
    mov ax,[bp+12]
    add ax,4
    cmp cx,ax
    jne line
    mov cx,[bp+12]
    inc dx
    mov ax,[bp+14]
    add ax,4
    cmp dx,ax
    jne line
    pop dx
    pop cx
    pop bx
    pop ax
    pop bp
    ret 4 ;two parameters=4 bytes
    pix endp
    foodpix proc near
    push bp
    push ax
    push cx
    push dx
    mov bp,sp
    mov dx,[bp+12]
    mov cx,[bp+10]
    inc cx
    mov ah,0ch
    mov al,color
    int 10h
    inc cx
    int 10h
    inc cx
    inc dx
    int 10h
    inc dx
    int 10h
    inc dx
    dec cx
    int 10h
    dec cx
    int 10h
    dec cx
    dec dx
    int 10h
    dec dx
    int 10h
    pop dx
    pop cx
    pop ax
    pop bp
    ret 4
    foodpix endp
    delay proc near
    push ax
    push bx
    push si
    push dx
    mov ah,2ch ;read time saved by DOS,1/100s
    int 21h
    mov bx,dx
    lea si,speed ;load EA of speed
    mov al,level
    mov ah,0
    add si,ax ;point to certain speed chosen by user
    dec si
    time:mov ah,2ch ;read time again
    int 21h
    sub dl,bl ;subtract old time
    jns compare
    add dl,100 ;if negtive,carry 1s=add 100
    compare:
    cmp dl,[si] ;compare to speed
    jl time ;if less,time is not up
    pop dx
    pop si
    pop bx
    pop ax
    ret
    delay endp
    rand proc near ;time as one parameter,return random number
    push ax
    push bx
    push cx ;seed=(seed*N1+N2) mod N3
    MOV CX,10
    MOV AL,SEED
    MOV BL,N1
    MUL BL
    MOV BL,N2
    MOV BH,0
    ADD AX,BX
    DIV N3
    MOV SEED,AH
    pop cx
    pop bx
    pop ax
    ret
    rand endp
    food proc near
    push ax
    push bx
    push cx
    push si
    push di
    food1:
    call rand ;get new position of food
    mov al,seed
    mov fx,al
    inc fx
    call rand
    mov al,seed
    mov fy,al
    inc fy
    mov bx,1
    lea si,sx
    lea di,sy
    effect:
    mov al,[si+bx]
    cmp al,fx
    jne next1
    mov al,[di+bx]
    cmp al,fy
    je food1 ;if new food is on snake,go to get new position
    next1:
    inc bl
    cmp bl,ls
    jle effect
    drawfood:
    mov bl,4
    mov al,fx
    mul bl
    push ax
    mov al,fy
    mul bl
    push ax
    mov color,1
    call foodpix
    pop di
    pop si
    pop cx
    pop bx
    pop ax
    ret
    food endp
    direction proc near ;return new direction and new head
    push ax
    push si
    push di
    lea si,sx
    lea di,sy
    mov ah,0
    mov al,ls
    add si,ax
    add di,ax
    mov al,[si]
    mov x,al ;move old head to x and y
    mov al,[di]
    mov y,al
    mov ah,1 ;scan keyboard
    int 16h
    jz kup ;no input,go to kup,use old derection
    mov al,d ;save old direction to dtemp
    mov dtemp,al
    mov d,ah
    cmp d,escape ;want to escape?
    je nodirection ;yes,escape
    cmp dtemp,up ;if new direction is oppisite to the old,go back
    jne ndown
    cmp d,down
    je back
    ndown:
    cmp dtemp,down
    jne nleft
    cmp d,up
    je back
    nleft:
    cmp dtemp,left
    jne nright
    cmp d,right
    je back
    nright:
    cmp dtemp,right
    jne kup
    cmp d,left
    jne kup
    back:mov al,dtemp ;use old direction
    mov d,al
    kup: cmp d,up ;create new head according to new direction
    jne kdown
    dec x
    jmp dend
    kdown:
    cmp d,down
    jne kleft
    inc x
    jmp dend
    kleft:
    cmp d,left
    jne kright
    dec y
    jmp dend
    kright:
    cmp d,right
    jne back
    inc y
    jmp dend
    nodirection: ;if input is escape,game over
    mov d,0
    dend:
    mov ah,0ch ;clear keyboard buffer
    mov al,6
    mov dl,0ffh
    int 21h
    pop di
    pop si
    pop ax
    ret
    direction endp
    newsnake proc near
    push ax
    push bx
    push si
    push di
    mov bl,4
    mov al,sx[1]
    mul bl
    push ax
    mov al,sy[1]
    mul bl
    push ax
    mov color,2 ;red,same to background
    call pix ;erase tail
    mov bl,1
    lea si,sx
    lea di,sy
    inc si
    inc di
    news: ;save preceding node to succeeding
    cmp bl,ls
    je newhead
    mov al,[si+1]
    mov [si],al
    mov al,[di+1]
    mov [di],al
    inc bl
    inc si
    inc di
    jmp news
    newhead: ;save temparary head to head
    mov al,x
    mov [si],al
    mov al,y
    mov [di],al
    pop di
    pop si
    pop bx
    pop ax
    ret
    newsnake endp
    liveordie proc near
    push ax
    push bx
    push si
    push di
    cmp d,0 ;if press escape,game over
    je die
    cmp x,0 ;if(x==0||y==0||x==41||y==41)
    je die ;out of range
    cmp x,41 ;game over
    je die
    cmp y,0
    je die
    cmp y,41
    je die
    mov bx,1
    lea si,sx
    lea di,sy
    itself: ;if new head is on itself,game over
    mov al,[si+bx]
    cmp al,x
    jne next2
    mov al,[di+bx]
    cmp al,y
    je die
    next2:
    inc bl
    cmp bl,ls
    jl itself
    jmp ldend
    die:
    mov lord,0
    ldend:
    pop di
    pop si
    pop bx
    pop ax
    ret
    liveordie endp
    score proc near ;output score
    push ax
    push bx
    push cx
    push dx
    mov ah,2
    mov dh,5
    mov dl,22
    mov bh,0
    int 10h
    mov al,ls
    sub al,4
    mul level
    mov cx,ax
    mov dl,0
    L1: cmp cx,100
    jnae L2
    inc dl
    sub cx,100
    jmp L1
    L2: add dl,30h
    mov ah,2
    int 21h
    mov dl,0
    L3: cmp cx,10
    jnae L4
    inc dl
    sub cx,10
    jmp L3
    L4: add dl,30h
    mov ah,2
    int 21h
    mov dl,cl
    add dl,30h
    mov ah,2
    int 21h
    pop dx
    pop cx
    pop bx
    pop ax
    ret
    score endp
    code ends
    end go


    برنامه دوم : (بازی مار غیر گرافیکی )
    ;|---------------------------
    ;|In the name of GOD
    ;|Snake game
    ;|C0DED
    ;|by
    ;|(Mahdi.Ghardashpoor)
    ;|USTMB.ir
    ;|---------------------------
    ;;********************************
    ;; SNAKE GAME Assembly Main File
    ;;********************************

    if1 ;agar k Assembler dar gozar-e
    ;avval(Pass#1) bashe ezafe kon
    include snake.LIB ;this ASM file is using SM.lib
    ;(includes needed macros in the current path)
    endif

    .model small
    .stack 128
    .data
    ;Colors:
    _COLOR_BLACK EQU 0000
    _COLOR_WHITE EQU 0111B
    _COLOR_GRAY EQU 1000B
    _COLOR_RED EQU 0100B
    _COLOR_RED_BLINK EQU 10000100B
    _COLOR_GREEN EQU 0010B

    ;Delays :
    _DELAY_N_NOVICE EQU 05FE0H ;Delay ziad
    _DELAY_N_PRO EQU 03FE0H ;normal delay
    _DELAY_N_EXPERT EQU 02FE0H ;Delay kam -- 02FE0H * 15.085 (micro second)
    GameDifficulty dw _DELAY_N_NOVICE ;Default

    ;_SNAKE_FACE EQU 177 ;#177
    _SNAKE_BACK EQU ' ' ;Taile snake ro pak kone ba in character
    _MAX EQU 0FFh ;Maximum arrayehaye marboot b snake
    _SNAKE_FACE_UPDOWN_0 EQU 221 ;#221 ascii
    _SNAKE_FACE_UPDOWN_1 EQU 222 ;#222 ascii
    _SNAKE_FACE_LEFTRIGHT_0 EQU '-' ;219;220 ;#220
    _SNAKE_FACE_LEFTRIGHT_1 EQU '_' ;219;223 ;#223
    SnakeFaceLeftRight1DarMioon db 0 ;age 0 bashe _ va age 1 bashe - (baraye Display jaleb-tar)
    SnakeFaceUpDown1DarMioon db 0 ;age 0 bashe | va age 1 bashe #220 (baraye Display jaleb-tar)

    ;Keys & Coordinates :
    _LEFT_DIRECTION EQU 4bh ;left arrow key
    _RIGHT_DIRECTION EQU 4dh ;right arrow key
    _UP_DIRECTION EQU 48h ;up arrow key
    _DOWN_DIRECTION EQU 50h ;down arrow key
    _ONE EQU 49 ;'1'
    _TWO EQU 50 ;'2'
    _THREE EQU 51 ;'3'
    ;
    _LEFTRIGHT_DIRECTION EQU _RIGHT_DIRECTION ;rast b chap ba chap b rast farghi nemikone baraye Display -_-_-_-_
    _UPDOWN_DIRECTION EQU _UP_DIRECTION ;bala b payin ba payin b bala farghi nemikone baraye Display
    ;
    _MIN_COLUMN EQU 0FFh
    _MIN_ROW EQU 0FFh
    _MAX_COLUMN EQU 80
    _MAX_ROW EQU 24
    ;
    _ZERO EQU 1 ;baraye Step-ha
    _PLUS EQU 2 ;ex: age XStep[si]==_NEGATIVE , YStep[si]==_ZERO bashe yani b samte bala dare mire
    _NEGATIVE EQU 3 ;yani XStep[si]+= -1 (--) beshe va YStep[si]+=0
    _INVALID_VAL EQU 99 ;invalid value baraye bazi Arrayeha k mikham meghdareshoon ro Invalid konam

    ;Snake :
    snakeLength db ? ;SNKAE LENGTH
    _SNAKE_DEFAULT_LEN EQU 5 ;Default Len
    _SNAKE_COLOR db _COLOR_WHITE
    ;
    XPoints db _MAX dup(_INVALID_VAL) ;X-haye Snake ro negah midare
    YPoints db _MAX dup(_INVALID_VAL) ;Y-haye Snake ro negah midare
    ;
    XPointsStep db _MAX dup(_ZERO) ;step marboot b har khooneye Snake ro negah midare .albate X esho ;
    YPointsStep db _MAX dup(_PLUS) ;step marboot b har khooneye Snake ro negah midare .albate Y esho (default=_PLUS yani b samte rast)
    PointsDirections db _MAX dup(_RIGHT_DIRECTION) ;baraye Display -e makhsoose har kodoom
    LastDirection db _RIGHT_DIRECTION ;jahate ghabli ro negah midare (baraye vaghtayi k khalafe jahat bezane ro check kone)
    ;
    XChangingPoints db _MAX dup(_INVALID_VAL) ;X changingPoints -ha ro negah midare..yani noghati k bayad SnakeBody dar inja ChangeDirection bede
    YChangingPoints db _MAX dup(_INVALID_VAL) ;Y ....
    ;
    XChangingPointsStep db _MAX dup(_INVALID_VAL) ;Step marboot b ChangingPoint -ha ro negah midare ..
    ;yani SnakeBody dar changingPoint morede nazar b che Direction-i bayad taghire jahat bede
    YChangingPointsStep db _MAX dup(_INVALID_VAL) ;....
    ;
    tailX db ? ;Snake Tail X
    tailY db ? ; Y
    ;

    ;Foods:
    XFood db _INVALID_VAL ;x food
    YFood db _INVALID_VAL ;y food
    ;_FOOD_FACE EQU '*'
    _MAX_FOOD_SCORE EQU 5 ;1..5 score baraye foods
    _FOOD_LIFE_TIME_DIV EQU 250 ;in adad bar FoodScore Div mishe va AL (kharej-ghesmat) ro dar FoodLifeTime mirize
    FoodScore db 0 ;scroe har food k PUT_CHAR mishe tooye in gharar migire
    FoodRemaind db 0 ;baghimandeye Food k hey bayad b Snake ezafe beshe (az tail-esh migire va ezafe mikone b akhare Snake)
    FoodLifeTime db 0 ;yani che meghdar zamani rooye safhe bashe va bad napadid beshe (baraye har food ba score bishtar kamtare- 1 nesbat-e aks dare bar FoodScore)
    UserScore db 0 ;user's Score
    UserSumScore db 0 ;Sum score of all levels (tooye LevelGameMode)
    blnNewFood db FALSE ;har vaght ghazaye jadid biad 1 mishe

    ;Walls & Levels :
    _WALL_FACE EQU 219 ;Ascii#219
    _WALL_COLOR EQU _COLOR_GRAY
    _MAX_WALL EQU 90 ;maximum tedad khoonehaye Wall baraye wallX,wallY
    _LEVEL_1 EQU 1
    _LEVEL_2 EQU 2
    _LEVEL_3 EQU 3
    wallCount db 0
    currentLevel db 0 ;current level
    blnLevelPassed db FALSE ;har level k pass beshe TRUE mishe va level# k pass shode ro ham dar level gharar migire
    LevelOKScore db 0 ;emtiazi k dar current level bayad user begire ta pass beshe (har marhale k miad maghadire oon marhale dar CurrentVariable-ha gharar migiran)
    wallX db _MAX_WALL DUP (_INVALID_VAL) ;Wall Coordinates
    wallY db _MAX_WALL DUP (_INVALID_VAL) ;
    Level_Border db 67,48,68,69,68, 32,98,121,32,77 ,97,104,100,105,46 ,71,104,97,114,100 ,97,104,112,111,111, 114,36,32,32
    ;Wall Level1 :
    Level_1_X db 0 , 1, 2, 3, 4 , 5, 6, 7, 0, 1 , 2, 3, 4, 5, 6 , 7,23,23,22,22 ,21,21,20,20,19 ,19,18,18,17,17
    Level_1_Y db 19,19,19,20,20 ,20,19,19,20,20 ,20,21,21,21,20 ,20,50,49,49,48 ,49,48,49,48,48 ,49,48,49,48,49
    Level_1_Wall_Count db 30
    _Level_1_OKScore EQU 10 ;emtiaz baraye oboor az Level1
    ;Wall Level2 :
    Level_2_X db 23,22,21,20,20 ,10,11,12,13,14 ,10,11,12,13,14 ,10,11,12,13,14 ,10,11,12,13,14
    db 0 ,1 ,2 ,3 ,4 ,0 ,1 ,2 ,3 , 4 ,0 ,1 ,2 ,3 ,4 ,0 ,1 ,2 ,3 ,4 ,0 ,1 ,2 ,3 ,4
    db 10,10,10,10,10 ,10,10,10,10,10 ,14,14,14,14,14 ,14,14,14,14,14

    Level_2_Y db 20,20,20,20,21 ,35,35,35,35,35 ,36,36,36,36,36 ,37,37,37,37,37
    db 38,38,38,38,38 ,75,75,75,75,75 ,76,76,76,76,76 ,77,77,77,77,77
    db 78,78,78,78,78 ,79,79,79,79,79 ,34,33,32,31,30 ,29,28,27,26,25
    db 39,40,41,42,43 ,44,45,46,47,48

    Level_2_Wall_Count db 70
    _Level_2_OKScore EQU 20 ;emtiaz baraye oboor az Level2
    ;Wall Level3 :
    Level_3_X db 0 ,1 ,2 ,3 ,4 ,0 ,1 ,2 ,3 , 4 ,0 ,1 ,2 ,3 ,4 ,0 ,1 ,2 ,3 ,4
    db 0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10,11,12,13,14 ,15,16,17,18,19
    db 10,11,12,13,14 ,10,11,12,13,14 ,5 ,6 ,7 ,8 ,9 ,10,11,12,13,14
    db 0 ,1 ,2 ,3 ,4 ,0 ,1 ,2 ,3 ,4 ,0 ,1 ,2 ,3 ,4 ,0 ,1 ,2 ,3,4 ,0 ,1 ,2 ,3 ,4

    Level_3_Y db 75,75,75,75,75 ,76,76,76,76,76 ,77,77,77,77,77 ,78,78,78,78,78
    db 79,79,79,79,79 ,21,21,21,21,21 ,21,21,21,21,21 ,21,21,21,21,21
    db 27,27,27,27,27 ,52,52,52,52,52 ,58,58,58,58,58 ,58,58,58,58,58
    db 58,58,58,58,58 ,37,37,37,37,37 ,38,38,38,38,38 ,39,39,39,39,39
    db 40,40,40,40,40 ,41,41,41,41,41

    Level_3_Wall_Count db 90
    _Level_3_OKScore EQU 30 ;emtiaz baraye oboor az Level3

    ;The Others:
    FALSE EQU 0
    TRUE EQU 1
    blnLevelGame db FALSE ;GameMode b soorat-e Level-i ya Normal (ta vaghti k besooze)
    cnt1 db 0
    cnt2 db 0
    cnt3 db 0
    pressedKey db 4DH ;har kelid k feshar dade beshe codesh dar in gharar migire -default 2 right
    blnLoose db FALSE ;agar k b khodesh ya wall bekhore true
    blnPlayAgain db FALSE
    Temp1 db ?
    Temp2 db ?
    ;

    ;strings :
    msgGameModeSelect db "Select Game Mode : $"
    msgGameModeNormal db "1. Normal (while u loose)$"
    msgGameModeLevel db "2. Level (3 levels)$"
    msgGameModeDiff db "Select game difficulty : $"
    msgGameModeDiffNovice db "1. Novice $"
    msgGameModeDiffPro db "2. Professional $"
    msgGameModeDiffExpert db "3. Expert $"

    msgPressAnyKey db "press any key...$"
    msgLoose db "::::::Game Over:::::$"
    msgLevel1Completed db "Level 1 Completed.$"
    msgLevel2Completed db "Level 2 Completed.$"
    msgLevel3Completed db "Level 3 Completed.$"
    msgWinner db "(:*****U:WIN:THE:GAME*****:)$"
    msgYourScore db "Your Score : $"
    msgPlayAgain db "Do u want 2 play again? (y/n) : $"
    ;====BEGIN OF C0DE :====================================================================================================================================
    .code

    MAIN proc far
    mov ax, @data
    mov ds, ax
    ;---------

    _MainSelectGameMode:
    call Select_Game_Mode ;Normal game || Level game? ... Beginner || Pro || Expert?
    call Clr_Scr
    cmp blnLevelGame,TRUE ;agar k :
    je _LevelGame ;Level bashe JMP _LevelGame
    call Normal_Game ;age NormalGame ro entekhab kone :
    jmp _MainLoop ;az in 2 khat bepar

    _LevelGame:
    mov bl, _LEVEL_1 ;Proc parameter
    call Goto_Level_bl ;Level morede nazar ro misaze (level 1)

    _MainLoop:
    call Display_Snake ;namayesh SnakeBody - har ja k hastesh -faghat karesh namayesh XPoints ,YPoints hastesh
    dec foodLifeTime ;bayad kam beshe..vaghti 0 beshe az rooye safhe pak beshe
    cmp foodLifeTime , 0 ;age 0 hast ya na :
    jne _MainNewFoodOrNot ;No > JMP _MainNewFoodOrNot - az in 3 khat zir bepar ...
    call Hide_Last_Food ;Yes> food ro hide kon va...
    call Make_Random_Point ;1 food jadid besaz...
    jmp _MainNoNewFood ;hala continue kon - az in 4 khat zir bepar

    _MainNewFoodOrNot: ;hanooz foodLifeTime 0 nashode va hala check mikone bebine Snake Food ro khorde ya na :
    cmp blnNewFood , 0 ;age 0 bashe yani NewFood nist...yani food khorde shode..pas bayad 1 food dige bezare
    jne _MainNoNewFood ;agar 1 bashe > agar k hanooz food hast dige food nazar
    call Make_Random_Point ;age Food jadid nabashe (khorde bashe) bayad besaze

    _MainNoNewFood:
    DO_DELAY GameDifficulty ;delay b andazeye GameDifficulty

    ;check for any keyPressed :
    CHECK_KEY_PRESSED ;agar k har kelidi feshar dade shode bashe ok => code scan kelid ro dar pressedKey mizare va sub Add_New_Changing_Point ro fara mikhoone ta
    ;check kone avval bebine kelid VALID zade shode va agar ok bood SnakeHead mishe 1 ChangingDirectionPoint...SnakeHead ro b List ChangingPoints ezafe mikone

    ;----------temp Label-----------
    mov cl,FALSE ;1 temp label...:D..
    _MainSelectGameModeTmp0: ;
    cmp cl,TRUE ;
    je _MainSelectGameMode ;
    ;----------/tempLabel/----------

    _MainSkip1:
    call Move_Snake ;move snake body...XPoints[si]+=XPointsStep[si] ,YPoints[si]+=YPointsStep[si] ;;albate mohemtarin Sub hamin hastesh...karaye dige ham mikone
    cmp blnLoose, TRUE ;bad az SnakeMoving age k SnakeBody b khodesh khorde bashe va ya b Wall khorde bashe blnLoose ro TRUE mikone va inja check mishe agar TRUE bashe :
    je _MainLoose ;agar TRUE bashe GAME~OVER

    ;agar k GameMode Level nabashe bayad Normal edame bede :
    cmp blnLevelGame, TRUE ;agar k noe bazi Level-i bashe bayad level-ha ro test kone vagarna
    jne _MainLoop ;bazi ro Normal edame bede - az in chand khatte payin (baraye check kardane Level-ha begzar)

    ;agar k 1 Level tamoom shode bashe :
    cmp blnLevelPassed, TRUE ;agar k Level tamoom shode
    jne _MainLoop ;NO > edameye bazi

    mov al, currentLevel ;YES (1 level tamoom shode bashe ) > current level to al

    _MainLevelPassed1: ;agar Level 1 pass shode bashe bayad b Level 2 bere
    cmp al, _LEVEL_1
    jne _MainLevelPassed2
    ;goto the next level (level2) :
    mov bl, _LEVEL_2 ;sub parameter (level 2)
    call Goto_Level_bl ;Goto Level 2
    jmp _MainLoop ;edameye bazi

    _MainLevelPassed2: ;agar k Level 2 pass shode bashe bayad b Level 3 bere
    cmp al, _LEVEL_2
    jne _MainLevelPassed3
    ;goto the next level (level3) :
    mov bl, _LEVEL_3 ;sub parameter (level 3)
    call Goto_Level_bl ;Goto Level 3
    jmp _MainLoop ;edameye bazi


    _MainLevelPassed3: ;ok game finished... :) WINNER (: **there's no next level..************************
    call U_Win ;call U_WIN
    jmp _MainStopGame ;bazi ro tamoom kon

    ;;--LOOSE :---------------
    _MainLoose: ;age blnLoose ==TRUE beshe ..mipare b in label
    call Clr_Scr
    SHOW_MSG msgLoose,1,1 ; ): LOOOS :(
    call wait_4_Any_Key

    ;;--EXIT THE GAME :------
    _MainStopGame:
    call Clr_Scr
    call show_Score ;show user score (age leveli bashe userSumScore else userScore)
    call wait_4_Any_Key

    ;wanna play again ?
    call wait_4_Any_Key
    call wanna_Play_Again ;question from user ...wants to play agian?
    cmp blnPlayAgain,TRUE
    jne _MainExit ;NO > Exit the game
    mov cl,TRUE ;bayad bere b SelectGameMode Label amma chon rahesh doore az in label komak migiram :D
    jmp _MainSelectGameModeTmp0 ;

    _MainExit:
    EXIT ;ret2os
    Main endp
    ;--End of MAIN---------------------------------------------------------------------------------------------------------
    ;======================================================================================================


    ;======================================================================================================
    ;Move_Snake( Parameter[s]: NULL) ReturnValue: NULL
    ;Snake ro harkat mide..har XPoint && YPoint ro ba step marboot b khodesh (b tore movazi dar arrayehaye XPointsStep,YPointsStep gharar daran)
    ;+ mikone va dar XPoints,YPoints gharar mide ta injoori Snake harkat kone
    ;albate ghablesh miad va check mikone har XPoint,YPoint ro agar k reside bashan b 1 noghteye ChangingDirectionPoint dar natije...
    ;step marboot b oon noghte ro dar step current gharar mide
    ;bad az harkat tamame khooneha, check mikone k b khodesh nakhorde bashe va ya b Walls nakhorde bashe
    ;va hamintor agar k b Foood reside bashe oono noosh-e jan mikone va roshd mikone
    ;va agar k userScore b emtiaze morede niaz baraye Current Level reside bashe blnLevelPassed=TRUE mizare ta level tamoom beshe
    ;...
    ;======================================================================================================
    Move_Snake proc near
    PUSH_ALL

    ;----tail jadid ro dar tailX,tailY mirize :
    mov al,snakeLength
    mov ah,0
    dec ax
    mov ah,0
    mov si,ax
    mov al,XPoints[si]
    mov ah,YPoints[si]
    mov tailX , al
    mov tailY , ah
    ;/

    mov si,0
    mov al,snakeLength ;b andazeye snakeLength
    mov cnt2,al ;b andazeye snakeLength
    mov bx,0 ;reset bx

    _MovLoop:
    mov al,XPoints[si] ;next X
    mov ah,YPoints[si] ;next Y

    ;//////////////FINDING 1 changingDirectionPoint in the List :
    FIND_IN_CHANGING_POINTS al,ah ;agar k Point Current reside b 1 noghteyi k bayad taghire jahat bede?
    cmp cl,1 ;agar peida kone cl ro ==1 mizare
    jne _NewStep ;NO > agar k peida nakone bikhial beshe..bayad hamoon step ghablish ro hefz kone va ba oon + beshe
    ;----changing direction (step-hashoon o taghir bede...step-haye marboot b oon ChangingDirectionPoint ro dar Step-haye current bezar) :
    ;new X:
    mov al,XChangingPointsStep[di] ;new Step X
    mov XPointsStep[si],al
    ;new Y:
    mov al,YChangingPointsStep[di] ;new Step Y
    mov YPointsStep[si],al
    ;/

    ;---hala agar k noghteye akhare Snake hastesh bayad ChangingPoint ro az listesh pak konam (chonke tamame Snake az oon noghte gozashtan):
    mov al,snakeLength
    mov ah,00
    dec ax
    cmp si, ax ;snakeLength-1
    jne _NewStep ;NO > deletesh nakon

    ;DELETE_CHANGING_POINT_BECAUSE_ALL_CROSSED_IT ...tamame noghat azash gozashtan=>bayad pak beshe
    mov XChangingPoints[di], _INVALID_VAL
    mov YChangingPoints[di], _INVALID_VAL
    ;/

    _NewStep:
    ;------baraye tayine Direction (LEFT2RIGHT || UP2DOWN) baraye Display :
    mov al,XPointsStep[si]
    mov ah,YPointsStep[si]

    cmp al, _NEGATIVE
    jne _DirectionUp2Down01
    mov PointsDirections[si],_UPDOWN_DIRECTION
    jmp _MakeNewStep

    _DirectionUp2Down01:
    cmp al, _PLUS
    jne _DirectionLeft2Right
    mov PointsDirections[si],_UPDOWN_DIRECTION
    jmp _MakeNewStep


    _DirectionLeft2Right:
    cmp ah, _NEGATIVE
    jne _DirectionLeft2Right01
    mov PointsDirections[si],_LEFTRIGHT_DIRECTION
    jmp _MakeNewStep

    _DirectionLeft2Right01:
    cmp ah, _PLUS ;dar har soorat 1 jahat ro peida mikone
    jne _MakeNewStep
    mov PointsDirections[si],_LEFTRIGHT_DIRECTION
    jmp _MakeNewStep

    ;-----Temp Label baraye Jump b _MovLoop
    mov cx,0
    _TempLbl01:
    cmp cx,1
    je _TempLbl02;_MovLoop
    ;/TempLabel

    ;---------har x,y ro ba Step khodesh jam mikone va mizare too khodesh (momkene dar chand khatte bala current step esh taghir karde bashe):
    ; ...dar har soorat in ghesmat faghat miad va XPoints+= XPointsStep
    _MakeNewStep:
    mov al,XPoints[si] ;x
    mov bl,XPointsStep[si]

    ;----new X :
    mov bh,_NEGATIVE ;agar k az balaye safhe bezane biroon
    cmp bl,bh ;YES > agar k X jadid beshe -1 bayad =23 bezaramesh ta az payin dar biad
    jne _over00
    cmp al,0
    jne _Norm00
    mov al,_MAX_ROW-1
    jmp _movSkip00
    _Norm00:
    dec al ;x--
    jmp _movSkip00

    _over00:
    mov bh,_PLUS
    cmp bl,bh ;agar k az payine safhe bezane biroon
    jne _movSkip00
    cmp al,_MAX_ROW
    jne _Norm01
    mov al,0 ;YES > agar k X jadid beshe 24 bayad az balaye safhe dar biad
    jmp _movSkip00
    _Norm01:
    inc al ;x++

    _movSkip00:
    mov XPoints[si],al ;X jadid (ya -- || ++ || 0 ro bezar too khodesh)
    ;/newX

    ;---new Y:
    mov al,YPoints[si] ;y
    mov bl,YPointsStep[si]

    mov bh,_NEGATIVE
    cmp bl,bh
    jne _over001
    cmp al,0
    jne _Norm02
    mov al,79
    jmp _movSkip01
    _Norm02:
    dec al ;y--
    jmp _movSkip01

    _over001:
    mov bh,_PLUS
    cmp bl,bh
    jne _movSkip01
    cmp al,_MAX_COLUMN-1
    jne _Norm03
    mov al,0
    jmp _movSkip01
    _Norm03:
    inc al ;y++

    _movSkip01:
    mov YPoints[si],al ;Y jadid (ya -- || ++ || 0 ro bezar too khodesh)
    ;/new Y

    inc si
    mov cx,1
    dec cnt2
    jnz _TempLbl01;_MovLoop b andazeye Snake bayad tamame khoonehasho Move bede


    ;---hala agar k Head Snake tooye 1ki az khoonehaye khodesh bashe yani LOOSE:
    mov al,XPoints[0] ;Snake Head X
    mov ah,YPoints[0] ;Snake Head Y

    mov si,1 ;az khooneye 2vom bayad harkat konam va har ja k X,Y ba Head barabar bood yani LOOSE
    mov cl,snakeLength ;b andazeye SnakeLength 1ki kamtar-chon avvalish Head hast
    mov ch,0
    dec cx

    _movCheckLooseBodyAgain:
    cmp XPoints[si],al
    jne _movChkLooseBodyResumeNext
    cmp YPoints[si],ah
    jne _movChkLooseBodyResumeNext
    ;agar k peida shod
    mov blnLoose , 1
    jmp _movCheckLooseWall

    _movChkLooseBodyResumeNext:
    inc si
    LOOP _movCheckLooseBodyAgain
    ;/

    ;****************WALL Checking :
    _movCheckLooseWall:
    cmp blnLevelGame , TRUE ;agar k bazi Normla bashe k in ghesmat ro rad kon
    jne _movFood ;agar k bazi b soorat-e Normal hast in tike ro rad sho
    ;---hala agar k Head Snake tooye 1ki az khoonehaye WALL bashe yani LOOSE:
    mov al,XPoints[0] ;Snake Head X
    mov ah,YPoints[0] ;Snake Head Y

    mov si, 0 ;az khooneye 2vom bayad harkat konam va har ja k X,Y ba Head barabar bood yani LOOSE
    mov cl, wallCount ;b andazeye wallCount
    mov ch, 0

    _movCheckLooseWallAgain:
    cmp al,WallX[si]
    jne _movChkLooseWallResumeNext
    cmp ah,WallY[si]
    jne _movChkLooseWallResumeNext
    ;agar k peida shod
    mov blnLoose , 1
    jmp _movFood ;dige bakhte

    _movChkLooseWallResumeNext:
    inc si
    LOOP _movCheckLooseWallAgain
    ;/

    ;*******/Wall checking

    _movFood:
    cmp foodRemaind,1 ;age hanooz Food hastesh k bayad b akharesh ezaef beshe :
    jng _movIfNewFood ;NO > agar k namoonde bayad bebine b Food jadid reside ya na
    dec foodRemaind ;YES > az Food moonde 1ki kam kon (haminjoori hey Teil-esh ro b Snake ezafe kon)
    jmp _movAddRemainingFoods ;YES > baghie Food ro ham b Snake ezafe kon(az tail-esh migire va hamoon ro mikone edameye Snake)

    ;***************hala agar k Head Snake resid b FOOD (XFood,YFood) :
    _movIfNewFood:
    mov al, XFood ;xfood
    mov ah, YFood ;yfood

    cmp XPoints[0],al
    jne _movNoFood ;NO >
    cmp YPoints[0],ah
    jne _movNoFood ;NO >
    ;YES ..resid b Food :

    ;----reside b FOOD:
    ;agar k peida shod
    ;hala b Food reside va bayad b andazeye foodScore b SnakeLen ezafe beshe :
    mov blnNewFood , 0 ;0 mikone ta dafeye dige dobare Random_Point bezare
    mov al,FoodScore
    mov ah,0
    mov FoodRemaind,al
    ;/resid b food

    _movAddRemainingFoods: ;age hanooz Food i hast k bayad b Tail-esh ezafe beshe
    mov al,snakeLength ;
    mov ah,0 ;
    mov si,ax ;gozashtan-e index tail dar si

    inc snakeLength ;
    inc UserScore ;emtiaz-e user ziad beshe

    mov al,TailX ;tail
    mov ah,TailY ;

    ; x,y Tail ro mirizam tooye khooneye jadid :
    mov XPoints[si], al ;Tail-esh mishe Point jadid
    mov YPoints[si], ah ;

    ;hala bayad step jadid ro ham besazam (az rooye step tail):
    mov al,XPointsStep[si-1] ;step-e tail (bayad az rooye hamin step, tail-e jadid ro besazam)
    mov ah,YPointsStep[si-1] ;

    mov XPointsStep[si],al ;step-haye tail ro beriz tooye khooneye jadid
    mov YPointsStep[si],ah ;

    ;If resid b LevelOkScore :
    mov al,UserScore
    cmp al, LevelOKScore
    jl _movNoFood
    ;ok : resid b LEVELokScore :
    mov blnLevelPassed , true
    ;********/

    _movNoFood:
    NOP

    POP_ALL
    ret
    Move_Snake endp
    ;======================================================================================================

    ;======================================================================================================
    ;Add_New_Changing_Point ( Parameter[s]: pressedKey=Kelide feshorde shode tavassote user) ReturnValue: NULL
    ;avval check mikone k khalaf-e Jahat nazade bashe..if YES then return mikone....
    ;badesh check mikone ValidKeyPressed bashe then jayi k SnakeHead hastesh ro b onvane 1 ChangingPointDirection dar
    ;nazar migire va b hamrahe step marboot b in noghte b list ezafe mikone ...
    ;ta har vaght k SnakeBody(1ki az XPoints || YPoints) b in noghte residan bayad
    ;XPointsStep && YPointsStep oon noghte ro begiran...yani taghire jahat bedan.OK?
    ;======================================================================================================
    Add_New_Changing_Point proc near
    PUSH_ALL

    ;----agar k jahat-e khalaf zad (dare chap mire bezane rast) bayad hichkar nakone :
    mov al,PressedKey
    mov ah,0

    CMP al, _LEFT_DIRECTION ;LEFT
    jne _AddOver02
    cmp LastDirection, _RIGHT_DIRECTION
    jne _AddOver02
    jmp _EndMove ;age k jahat-e ghabli Right boode va alan Left zade bikhial

    _AddOver02:
    CMP al, _RIGHT_DIRECTION ;RIGHT
    jne _AddOver03
    cmp LastDirection, _LEFT_DIRECTION
    jne _AddOver03
    jmp _EndMove ;age k jahat-e ghabli Left boode va alan Right zade bikhial

    _AddOver03:
    CMP al, _UP_DIRECTION ;UP
    jne _AddOver04
    cmp LastDirection, _DOWN_DIRECTION
    jne _AddOver04
    jmp _EndMove ;age k jahat-e ghabli Down boode va alan UP zade bikhial

    _AddOver04:
    CMP al, _DOWN_DIRECTION ;DOWN
    jne _AddNewChangingDirection
    cmp LastDirection, _UP_DIRECTION
    jne _AddNewChangingDirection
    jmp _EndMove ;age k jahat-e ghabli UP boode va alan Down zade bikhial
    ;/

    ;----Check if VALID keypressed :
    _AddNewChangingDirection: ;check kone bebine 1ki az 4 jahat bashe else _endMove
    mov al,PressedKey
    mov ah,0

    CMP al, _LEFT_DIRECTION ;LEFT
    JE _AddNewChangingDirectionOK
    CMP al, _RIGHT_DIRECTION ;RIGHT
    JE _AddNewChangingDirectionOK
    CMP al, _UP_DIRECTION ;UP
    JE _AddNewChangingDirectionOK
    CMP al, _DOWN_DIRECTION ;DOWN
    JE _AddNewChangingDirectionOK

    jmp _endMove ;age hich kodom naboodan bikhial.
    ;/
    ;---Add newChangingDirectionPoint 2 the list:
    _AddNewChangingDirectionOK: ;1ki az 4 ta jahat ro zade..hala bayad 1 NewChangingDirectionPoint bezaram tooy List
    mov al, XPoints[0] ;X marboot b Snake Head ;bayad noghteye marboot b head snake ro bezaram too list
    mov ah, YPoints[0] ;Y marboot b Snake Head ;;ta harvaght k SnakeBody b in noghte berese ChangeDirection bede

    ;------Find an empty cell in list 4 adding new ChaningPoint :
    mov si,0
    _AddNewFindAgain:
    cmp XchangingPoints[si],99
    je _FoundEmptyCell
    inc si
    jmp _AddNewFindAgain
    ;------/Find

    _FoundEmptyCell:
    mov XChangingPoints[si], al ;gharar dadane ChangingPoint jadid dar 1 khaneye khali list
    mov YChangingPoints[si], ah

    mov al,PressedKey
    mov ah,0

    CMP al, _LEFT_DIRECTION ;LEFT
    JE _LeftDirection
    CMP al, _RIGHT_DIRECTION ;RIGHT
    JE _RightDirection
    CMP al, _UP_DIRECTION ;UP
    JE _UpDirection
    CMP al, _DOWN_DIRECTION ;DOWN
    JE _DownDirection

    ;---lbl Temp baraye JUMP:
    _AddNewLblTemp:
    jmp _endMove ;age hich kodom naboodan bikhial
    ;---lblTemp/

    _LeftDirection:
    mov XChangingPointsStep[si] , _ZERO
    mov YChangingPointsStep[si] , _NEGATIVE ;b jaye (0ffh)-1 3 mizaram - b jaye 0 > 1 - b jaye 1 > 2
    mov LastDirection , _LEFT_DIRECTION
    jmp _endMove

    _RightDirection:
    mov XChangingPointsStep[si] , _ZERO
    mov YChangingPointsStep[si] , _PLUS
    mov LastDirection , _RIGHT_DIRECTION
    jmp _endMove

    _UpDirection:
    mov XChangingPointsStep[si] , _NEGATIVE
    mov YChangingPointsStep[si] , _ZERO
    mov LastDirection , _UP_DIRECTION
    jmp _endMove

    _DownDirection:
    mov XChangingPointsStep[si] , _PLUS
    mov YChangingPointsStep[si] , _ZERO
    mov LastDirection , _DOWN_DIRECTION
    jmp _endMove
    ;/AddNewChangingPoint2theList

    _endMove:
    POP_ALL
    ret
    Add_New_Changing_Point endp
    ;======================================================================================================

    ;======================================================================================================
    ;Display_Snake( Parameter[s]: NULL) ReturnValue: NULL
    ;SnakeBody ro neshoon mide..har koja k bashe..
    ;b soorat-e 1darMioon va Pelleyi va neshoon mide Snake ro..SnakeFace monaseb ro entekhab mikone va dar
    ;AL mireze va PUT_CHAR mikone oono dar position [XPoints+si][YPoints+si]
    ;======================================================================================================
    Display_Snake proc near
    PUSH_ALL

    mov si,0
    mov al,snakeLength
    mov cnt2,al ;count


    _disLoop0: ;loop 4 drawing snakes's body
    Set_Pos [XPoints+si],[YPoints+si] ;set position
    ;***************Display bar asase Direction :
    mov dl , [PointsDirections+si] ;direction Point ro dar dl gharar midae baraye moghayesehaye lazem

    cmp dl , _LEFTRIGHT_DIRECTION
    jne _disDirectionUpDown
    ;if (chap b rast bashe :)
    cmp snakeFaceLeftRight1DarMioon,0 ;age chap b rast (rast b chap) hastesh :
    jne _disDirection00 ;NO
    mov snakeFaceLeftRight1DarMioon, 1 ;YES > baraye dafeye bad avazesh kon
    mov al, _SNAKE_FACE_LEFTRIGHT_0 ;Display marboot b oon ro bezar
    jmp _disPutChar
    _disDirection00:
    mov snakeFaceLeftRight1DarMioon, 0 ;baraye dafeye bad avazesh kon
    mov al, _SNAKE_FACE_LEFTRIGHT_1 ;character marboot b oon ro baraye PUT_CHAR bezar dar AL
    jmp _disPutChar
    ;}
    ;else if (bala b payin bashe)
    ;{
    _disDirectionUpDown:
    cmp snakeFaceUpDown1DarMioon,0 ;age bala b payin(payin b bala) hastesh :
    jne _disDirection01
    mov snakeFaceUpDown1DarMioon, 1 ;baraye dafeye bad avazesh kon
    mov al, _SNAKE_FACE_UPDOWN_0 ;Display marboot b oon ro bezar
    jmp _disPutChar
    _disDirection01:
    mov snakeFaceUpDown1DarMioon, 0 ;baraye dafeye bad avazesh kon
    mov al, _SNAKE_FACE_UPDOWN_1 ;Display marboot b oon ro bezar
    ;}

    _disPutChar:
    Put_Char al, _SNAKE_COLOR ;print SnakeFace with Color
    inc si
    dec cnt2
    jnz _disLoop0 ;b andazeye SnakeLength edame bede
    ;/********

    ;----erase tail:
    SET_POS tailX,tailY ;set to Tail's Position
    Put_Char _SNAKE_BACK, _COLOR_BLACK ;print character
    ;/
    POP_ALL
    ret
    Display_Snake endp
    ;======================================================================================================
    ;======================================================================================================

    ;======================================================================================================
    ;Make_Random_Point ( Parameter[s]: NULL) ReturnValue: NULL
    ;ba komake sadomSecond % 24 baraye Row , sadomSecond%80 baraye Column
    ;check mikone agar k rooye SnakeBody ya Walls bashe dobare rndPoint ro besaze
    ;rndX ro tooye CL va rndY ro tooye CH mizare va dar oon position PUT_CHAR mikone FoodScore ro
    ;======================================================================================================
    Make_Random_Point proc near
    PUSH_ALL

    ;----make random x,y
    _RndAgain: ;agar k point ro k mizare rooye safhe, rooye Wall bashe || rooye SnakeBody bashe miad inja va dobare mikeshe
    mov bl,24 ;MAX_ROW
    mov bh,80 ;MAX_COL

    mov ah,2ch ;service baraye gereftane s@t
    int 21h ;gereftane s@t

    mov ah,0
    mov al,dl ;sadom sanie(k dar DL hast) ro tooye AL beriz
    DIV bl ;DIV...kharej-ghesmat dar AH, Baghi-mande dar AL
    mov XFood,ah ;baghimande (ROW) dar XFood

    ;
    mov ah,2ch ;service baraye gereftane s@t
    int 21h ;gereftane s@t

    mov ah,0
    mov al,dl ;sadom sanie(k dar DL hast) ro tooye AX beriz
    DIV bh ;kharej-ghesmat dar AH, Baghi-mande dar AL
    mov YFood,ah ;baghimande (COL) dar YFood

    Set_Pos XFood,YFood ;set position to Food X,Y
    ;/
    ;**************bayad check konam age 1vaght rooye SnakeBody nazare :
    mov al, XFood
    mov ah, YFood
    mov cl,snakeLength
    mov ch,0
    mov si,0

    _RndCheckAgain:
    cmp XPoints[si],al
    jne _RndResumeNext
    cmp YPoints[si],ah
    jne _RndResumeNext
    ;age hamin noghte bashe ;hala bayad 1 bare dige noghte ro bezaram
    jmp _RndAgain

    _RndResumeNext:
    inc si
    LOOP _RndCheckAgain
    ;***************/
    ;***************bayad check konam rooye Wall nazare :
    mov al, XFood
    mov ah, YFood
    mov cl, WallCount
    mov ch, 0
    mov si, 0

    _RndCheckAgain2:
    cmp WallX[si],al
    jne _RndResumeNext2
    cmp WallY[si],ah
    jne _RndResumeNext2
    ;age hamin noghte bashe ;hala bayad 1 bare dige noghte ro bezaram
    jmp _RndAgain

    _RndResumeNext2:
    inc si
    LOOP _RndCheckAgain2
    ;*******************/
    ;----random score point :
    mov bh, _MAX_FOOD_SCORE ;foodScore= rnd( 1 .. _MAX_FOOD_SCORE )

    mov ah,2ch ;service baraye gereftane s@t
    int 21h ;gereftane s@t

    mov ah,0
    mov al,dl ;sadom sanie(k dar DL hast) ro tooye AX beriz
    DIV bh ;kharej-ghesmat dar AH, Baghi-mande dar AL
    inc ah ;0 nashe (1..5)
    mov FoodScore,ah ;baghimande (COL) dar YFood

    mov ah,0
    mov al,_FOOD_LIFE_TIME_DIV
    DIV FoodScore
    mov foodLifeTime , al ;kharej ghesmat dar foodLifeTime ...ta b hamin andaze rooye safhe bashe...badesh pak beshe va 1 food jadid sakhte beshe

    mov bl, _COLOR_GREEN ;color green (normal food scroe (<5))
    mov al, FoodScore
    cmp al,5
    jne _RndNormalColor
    mov bl, _COLOR_RED_BLINK ;baraye 5 score Blink RED bezar

    _RndNormalColor:
    add al, 48 ;convert digit to ascii (3 > '3')
    Put_Char al,bl ;Put Food
    mov blnNewFood , 1 ;Food jadid oomade... new food hast

    POP_ALL
    ret
    Make_Random_Point endp
    ;======================================================================================================
    ;======================================================================================================

    ;======================================================================================================
    ;U_Win( Parameter[s]: NULL) ReturnValue: NULL
    ;vaghti k level 3 tamoom beshe in sub call mishe
    ;1 msg tabrik neshoon mide faghat :D
    ;======================================================================================================
    U_Win proc near;MACRO
    call Clr_Scr
    SHOW_MSG msgWinner , 9,24
    SET_POS 0 ,0
    DO_DELAY 0bffh
    call wait_4_Any_Key
    ret
    U_Win ENDp
    ;======================================================================================================

    ;======================================================================================================
    ;Show_Score( Parameter[s]: NULL) ReturnValue: NULL
    ;if blnLevelGame==TRUE then userScore else userSumScore ro namayesh mide vasate safhe
    ;ba DIV motavali bar 10 Remainders ro mikeshe biroon va tabdil b ASCII mikone va namayesh mide
    ;======================================================================================================
    Show_Score proc
    PUSH_ALL
    ;SET_POS 11,24
    SHOW_MSG msgYourScore , 11,24
    mov dh,11
    mov dl,40

    cmp blnLevelGame,TRUE
    jne _ShowScoreAgain
    mov al, userSumScore
    add userScore , al

    _ShowScoreAgain:
    push dx
    mov bx,000Ah
    mov al, userScore
    CBW ;change byte 2 word ()
    CWD ;change word 2 double 4 DIV

    div bx
    mov userScore,al
    add dx,48
    mov ax,dx

    ;
    pop dx
    dec dl
    Set_Pos dh,dl

    Put_Char al , 10000111b

    cmp userScore,0
    jne _ShowScoreAgain
    ;
    SET_POS 0,0
    DO_DELAY 5ffh
    POP_ALL
    ret
    Show_Score endp
    ;======================================================================================================

    ;===========================================================
    ;PAINT_LEVEL ( Parameter[s]: bl=Level#) ReturnValue: NULL
    ;maghadir-e tarif shode baraye har Level ro dar maghadire WallCurrents mizare bar asase bl
    ;bar asase parametre voroodi bl ,original wallX,wallY ,wallCount ro misaze
    ;then call PAINT_WALL to display currentLevel(walls) on the screen
    ;===========================================================
    Paint_Level proc near
    PUSH_ALL

    mov si,0
    cmp bl , _LEVEL_2
    je _PaintLevel2Copy

    cmp bl , _LEVEL_3
    je _PaintLevel3Copy

    ;---MAke Level 1 :
    _PaintLevel1Copy:
    mov LevelOkScore , _LEVEL_1_OKSCORE ;
    mov al, Level_1_Wall_Count ;bayad b andazeye _wallCount bashe
    mov ah,0
    mov wallCount , al
    mov cx,ax

    _PaintLevel1CopyAgain: ;copy Level1 variables into CurrentsLevels(Walls) variables
    mov al, Level_1_X[si] ;
    mov ah, Level_1_Y[si] ;

    mov wallX[si], al ;
    mov wallY[si], ah ;

    inc si
    LOOP _PaintLevel1CopyAgain
    jmp _MakeLevelFinish
    ;/

    ;---MAke Level 2 :
    _PaintLevel2Copy:
    mov LevelOkScore , _LEVEL_2_OKSCORE
    mov al, Level_2_wall_Count
    mov ah,0
    mov wallCount , al
    mov cx,ax

    _PaintLevel2CopyAgain:
    mov al, Level_2_X[si] ;copy Level2 variables into CurrentsLevels(Walls) variables
    mov ah, Level_2_Y[si]

    mov wallX[si], al
    mov wallY[si], ah

    inc si
    LOOP _PaintLevel2CopyAgain
    jmp _MakeLevelFinish
    ;/

    ;---MAke Level 3 :
    _PaintLevel3Copy:
    mov LevelOkScore , _LEVEL_3_OKSCORE
    mov al, Level_3_Wall_Count
    mov ah,0
    mov wallCount , al
    mov cx,ax

    _PaintLevel3CopyAgain: ;copy Level3 variables into CurrentsLevels(Walls) variables
    mov al, Level_3_X[si]
    mov ah, Level_3_Y[si]

    mov wallX[si], al
    mov wallY[si], ah

    inc si
    LOOP _PaintLevel3CopyAgain
    ;/

    _MakeLevelFinish:
    PAINT_WALL ;ok,wall arrays por shodan..now let's paint walls

    POP_ALL
    ret
    Paint_Level ENDp
    ;===========================================================

    ;===========================================================
    ;Make_Default_Snake( Parameter[s]: NULL) ReturnValue: NULL
    ;1 Snake ba maghadire Default misaze (SnakeLen=5)
    ;===========================================================
    Make_Default_Snake proc near
    mov snakeLength,5
    mov blnLevelPassed,FALSE
    mov lastDirection ,_RIGHT_DIRECTION
    mov dl,0 ;baraye taghire Direction baraye har point

    ;---Make default snake Arrays:
    mov cl,snakeLength
    mov ch,0
    mov si,0
    mov al,10
    mov ah,78

    _DefAgain:
    mov XPoints[si], al
    mov YPoints[si], ah

    mov XPointsStep[si],_ZERO
    mov YPointsStep[si],_PLUS
    mov PointsDirections[si],_RIGHT_DIRECTION ;baraye Display -e makhsoose har kodoom
    ;
    cmp dl,0
    jne _DefUpDownDirection
    mov dl,0
    mov PointsDirections[si], _LEFTRIGHT_DIRECTION
    jmp _DefResumeNext

    _DefUpDownDirection:
    mov dl,1
    mov PointsDirections[si], _UPDOWN_DIRECTION


    _DefResumeNext:
    inc si
    dec ah
    LOOP _DefAgain
    ;/

    ;---make default ChangingPoints Arrays :
    mov cx,_MAX
    mov si,0

    _DefResAgain:
    mov XChangingPoints[si], _INVALID_VAL ;1 meghdare na-motabar (99)
    mov YChangingPoints[si], _INVALID_VAL ;
    ;
    mov XChangingPointsStep[si],_INVALID_VAL ;
    mov YChangingPointsStep[si],_INVALID_VAL ;

    inc si
    LOOP _DefResAgain
    ;/

    ret
    Make_Default_Snake ENDp
    ;===========================================================

    ;===========================================================
    ;Normal_Game( Parameter[s]: NULL) ReturnValue: NULL
    ;agar hengame SelectGameMode Normal ro bezane in sub call mishe va bazi normal ro misaze ...
    ;ta vaghti k user nasooze bazi edame dare
    ;===========================================================
    Normal_Game proc near
    mov blnLoose,FALSE
    mov blnLevelPassed ,FALSE

    mov FoodScore,0
    mov FoodRemaind,0
    mov FoodLifeTime,0
    mov UserScore,0
    mov UserSumScore,0
    mov blnNewFood ,FALSE

    call Clr_Scr
    call MAKE_DEFAULT_SNAKE ;1 Snake Default misaze
    ret
    Normal_Game endp
    ;===========================================================


    ;======================================================================================================
    ;Init_Game( Parameter[s]: bl=_LEVEL_#) ReturnValue: currentLevel=bl
    ;variables ro reset mikone va level bl ro misaze
    ;======================================================================================================
    Init_Game proc near
    mov blnLoose,FALSE
    mov blnLevelPassed ,FALSE

    mov FoodScore,0
    mov FoodRemaind,0
    mov FoodLifeTime,0
    mov UserScore,0
    mov blnNewFood ,FALSE

    call Clr_Scr
    call MAKE_DEFAULT_SNAKE
    mov currentLevel , bl ;current level beshe _Level
    call Paint_Level ;currentLevel ro mikeshe roo safhe
    ret
    Init_Game ENDp
    ;======================================================================================================


    ;===========================================================
    ;Clr_Scr( Parameter[s]: NULL) ReturnValue: NULL
    ;clear the screen with White on Black colors
    ;===========================================================
    Clr_Scr proc near
    ; mov ah,00
    ; mov al,3
    ; int 10h ;set monitor mode 1
    mov ah,06
    mov al,00
    mov bh,00000111b ;White on black
    mov cx,0000h
    mov dx,184fh
    int 10h
    ret
    Clr_Scr ENDp
    ;===========================================================

    ;===========================================================
    ;Goto_Level_1( Parameter[s]: NULL) ReturnValue: NULL
    ;bazi ro b level 1 mibare (if blnLevel==TRUE)
    ;===========================================================
    Goto_Level_1 proc near
    call Clr_Scr

    mov GameDifficulty , _DELAY_N_NOVICE
    mov bx,1 ;parameter morede niaz baraye Init_Game
    call Init_Game ;Init_Game (_LEVEL_1)
    mov userSumScore,0 ;dar level 1 userSumScore=0 hastesh
    ret
    Goto_Level_1 endp
    ;===========================================================

    ;===========================================================
    ;Goto_Level_2( Parameter[s]: NULL) ReturnValue: NULL
    ;bazi ro b level 2 mibare (if blnLevel==TRUE)
    ;===========================================================
    Goto_Level_2 proc near
    call Clr_Scr

    SHOW_MSG msgLevel1Completed , 12,30
    call Wait_4_Any_Key
    DO_DELAY 0affh

    mov GameDifficulty , _DELAY_N_PRO
    mov al,userScore
    add userSumScore,al ;emtiaz kolli user ro dar userSumScore negah midare(dar vaghte userSumScore+=userScore)
    mov bx,2 ;parameter morede niaz baraye Init_Game
    call Init_Game ;Init_Game (_LEVEL_2)
    ret
    Goto_Level_2 endp
    ;===========================================================

    ;===========================================================
    ;Goto_Level_3( Parameter[s]: NULL) ReturnValue: NULL
    ;bazi ro b level 3 mibare (if blnLevel==TRUE)
    ;===========================================================
    Goto_Level_3 proc near
    call Clr_Scr

    SHOW_MSG msgLevel2Completed , 12,22
    call Wait_4_Any_Key
    DO_DELAY 0affh

    mov GameDifficulty , _DELAY_N_EXPERT
    mov al,userScore
    add userSumScore,al ;emtiaz kolli user ro dar userSumScore negah midare(dar vaghte userSumScore+=userScore)
    mov bx, _LEVEL_3 ;parameter morede niaz baraye Init_Game
    call Init_Game ;Init_Game (_LEVEL_3)
    ret
    Goto_Level_3 endp
    ;===========================================================


    ;===========================================================
    ;Goto_Level_bl( Parameter[s]: bl=Level#) ReturnValue: NULL
    ;bazi ro b level# mibare ...age bazi b soorat-e Level i bashe (blnLevel==TRUE) then vaghti k 1 level tamoom beshe in sub call mishe
    ;va bazi ro b level badi mibare
    ;===========================================================
    Goto_Level_bl proc near
    call Clr_Scr

    cmp bl,_LEVEL_1 ;age Level 1 bashe
    jne _GotoLevel2 ;NO
    call Goto_Level_1 ;YES > GotoLevel1
    ret

    _GotoLevel2:
    cmp bl,_LEVEL_2 ;age Level 2 bashe
    jne _GotoLevel3 ;NO
    call Goto_Level_2 ;YES > GotoLevel2
    ret

    _GotoLevel3: ;age Level 3 bashe
    call Goto_Level_3 ;YES
    ret
    Goto_Level_bl endp
    ;===========================================================

    ;======================================================================================================
    ;Wai_4_Any_Key( Parameter[s]: NULL ) ReturnValue: NULL
    ; wait for any key....
    ;======================================================================================================
    Wait_4_Any_Key proc near ;MACRO
    push ax

    mov ah, 1
    int 21h

    pop ax
    ret
    Wait_4_Any_Key ENDp
    ;===========================================================

    ;===========================================================
    ;Hide_Last_Food( Parameter[s]: XFood , YFood ) ReturnValue: NULL
    ;Food i k rooye safhe hastesh (dar XFood o YFood) ro pak mikone
    ;===========================================================
    Hide_Last_Food proc near
    Set_Pos XFood,YFood ;boro Xfood , YFood current
    Put_Char _SNAKE_BACK , _COLOR_BLACK ;pakesh kon
    ret
    Hide_Last_Food ENDp
    ;===========================================================

    ;===========================================================
    ;Wanna_Play_Again (Parameters : NULL) ReturnValue: blnPlayAgain =TRUE||FALSE
    ;vaghti k bekhad az bazi kharej beshe (momkene LOOSE shode bashe va ya vasaste bazi ESC zade bashe va ya WINNER shode)
    ;dar in soorat in sub call mishe va az user miporse k mikhad dobare bazi kone ya na...
    ;===========================================================
    Wanna_Play_Again proc near
    call Clr_Scr
    SHOW_MSG msgPlayAgain , 1,1
    DO_DELAY 0effh

    _wannaPlayAgain: ;agar kelide zade shode user gheir az 'Y' || 'y' || 'N' || 'n' bashe b inja bar migarde
    ;check keys : ;ta dobare az user voroodi begire
    mov ah, 00h
    int 16h ;get key from user without display it

    cmp al, 121 ;'y'
    je _wannaPlayAgainYES
    cmp al, 89 ;'Y'
    je _wannaPlayAgainYES

    cmp al, 110 ;'n'
    je _wannaPlayAgainNO
    cmp al, 78 ;'N'
    je _wannaPlayAgainNO

    jmp _wannaPlayAgain ;agar k kelide gheir az 'y' || 'Y' || 'n' || 'N' zade bashe dobare begir


    _wannaPlayAgainYES:
    mov blnPlayAgain , TRUE ;blnPlayAgain ro ==TRUE mizare va return mikone..dar Main check mikone agar
    ret ;blnPlayAgain==TRUE then dobare hame chi ro misaze va az avval bazi shoroo mishe

    _wannaPlayAgainNO:
    mov blnPlayAgain , FALSE ;
    ret
    wanna_Play_Again endp
    ;======================================================================================================
    ;Select_Game_Mode ( Parameter[s]: NULL ) ReturnValue: blnLevelGame=TRUE || FALSE
    ;Game mode ro migire az user (Level || Normal) ...dar Main check mikone agar age blnLevelGame==TRUE bashe 1 bazie 3-Level misaze
    ;======================================================================================================
    Select_Game_Mode proc near
    call Clr_Scr
    PUT_CHAR 126 , 4
    SHOW_MSG msgGameModeSelect , 5 , 4 ;namayesh msgGameModeSelect
    SHOW_MSG msgGameModeNormal , 7 , 9
    SHOW_MSG msgGameModeLevel , 8 , 9

    _SelectGameModeAgain: ;agar k kelidi gheir az '1' || '2' bezane b inja bar migarde
    ;check keys :

    get Level_Border , 02h , 02h
    mov ah, 00h
    int 16h ;get key from user without display it

    cmp al, _ONE ; if '1' :
    je _SelectGameModeNormal ;YES goto _SelectGameModeNormal
    cmp al, _TWO ;|| '2' :
    je _SelectGameModeLevel ;YES goto _SelectGameModeLevel


    jmp _SelectGameModeAgain ;NO .... agar k kelide gheir az 1,2 zade bashe dobare az user begir

    ;---------
    _SelectGameModeLevel: ;bazi b soorat-e Levels bashe
    mov blnLevelGame , TRUE ;in variable ro TRUE mizare va Return mikone
    ret ;dar Main check mikone agar k blnLevelGame == TRUE Then bazi b soorat-e Level i ejra beshe
    ;--------

    _SelectGameModeNormal:
    mov blnLevelGame , FALSE ;bazi b soorate Normal (ta vaghti k user Loose beshe)
    ;select difficulty :
    call Clr_Scr
    SHOW_MSG msgGameModeDiff , 5 ,5
    SHOW_MSG msgGameModeDiffNovice , 7 ,9
    SHOW_MSG msgGameModeDiffPro , 8 ,9
    SHOW_MSG msgGameModeDiffExpert , 9 ,9

    _SelectGameModeDiffAgain: ;agar k user kelide eshtebah bezane (gheir az '1' || '2' || '3') bar migarde b inja
    mov ah, 00h
    int 16h ;get key from user without display it

    cmp al, _ONE ;if '1' :
    je _SelectGameModeDiffNovice ;YES > Novice
    cmp al, _TWO ;else if '2'
    je _SelectGameModeDiffPro ;YES > Pro
    cmp al, _THREE ;else if '3'
    je _SelectGameModeDiffExpert ;YES > Expert

    jmp _SelectGameModeDiffAgain ;agar k kelid eshtebah zade bashe dobare begir az user
    ret

    _SelectGameModeDiffNovice:
    mov GameDifficulty , _DELAY_N_NOVICE ;Delay dar hadde NOVICE (mobtadi)
    ret

    _SelectGameModeDiffPro:
    mov GameDifficulty , _DELAY_N_PRO ;Delay dar hadde Professional
    ret

    _SelectGameModeDiffExpert:
    mov GameDifficulty , _DELAY_N_EXPERT ;Delay dar hadde Expert
    ret
    Select_Game_Mode endp
    ;======================================================================================================

    ;:::End of Program :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    end MAIN



    برنامه سوم : (بازی مار قابل استفاده در Emu8086)
    ; Snake Game for Emu8086
    ; you can control the snake using arrow keys on your keyboard.
    ; all other keys will stop the snake.
    ; press esc to exit.
    ; Ustmb.ir

    name "snake"

    org 100h

    ; jump over data section:
    jmp start

    ; ------ data section ------

    s_size equ 7

    ; the snake coordinates
    ; (from head to tail)
    ; low byte is left, high byte
    ; is top - [top, left]
    snake dw s_size dup(0)

    tail dw ?

    ; direction constants
    ; (bios key codes):
    left equ 4bh
    right equ 4dh
    up equ 48h
    down equ 50h

    ; current snake direction:
    cur_dir db right

    wait_time dw 0

    ; welcome message
    msg db "==== how to play ====", 0dh,0ah
    db "this game was debugged on emu8086", 0dh,0ah
    db "but it is not designed to run on the emulator", 0dh,0ah
    db "because it requires relatively fast video card and cpu.", 0dh,0ah, 0ah

    db "if you want to see how this game really works,", 0dh,0ah
    db "run it on a real computer (click external->run from the menu).", 0dh,0ah, 0ah

    db "you can control the snake using arrow keys", 0dh,0ah
    db "all other keys will stop the snake.", 0dh,0ah, 0ah

    db "press esc to exit.", 0dh,0ah
    db "====================", 0dh,0ah, 0ah
    db "press any key to start...$"

    ; ------ code section ------

    start:

    ; print welcome message:
    mov dx, offset msg
    mov ah, 9
    int 21h


    ; wait for any key:
    mov ah, 00h
    int 16h


    ; hide text cursor:
    mov ah, 1
    mov ch, 2bh
    mov cl, 0bh
    int 10h


    game_loop:

    ; === select first video page
    mov al, 0 ; page number.
    mov ah, 05h
    int 10h

    ; === show new head:
    mov dx, snake[0]

    ; set cursor at dl,dh
    mov ah, 02h
    int 10h

    ; print '*' at the location:
    mov al, '*'
    mov ah, 09h
    mov bl, 0eh ; attribute.
    mov cx, 1 ; single char.
    int 10h

    ; === keep the tail:
    mov ax, snake[s_size * 2 - 2]
    mov tail, ax

    call move_snake


    ; === hide old tail:
    mov dx, tail

    ; set cursor at dl,dh
    mov ah, 02h
    int 10h

    ; print ' ' at the location:
    mov al, ' '
    mov ah, 09h
    mov bl, 0eh ; attribute.
    mov cx, 1 ; single char.
    int 10h



    check_for_key:

    ; === check for player commands:
    mov ah, 01h
    int 16h
    jz no_key

    mov ah, 00h
    int 16h

    cmp al, 1bh ; esc - key?
    je stop_game ;

    mov cur_dir, ah

    no_key:



    ; === wait a few moments here:
    ; get number of clock ticks
    ; (about 18 per second)
    ; since midnight into cx:dx
    mov ah, 00h
    int 1ah
    cmp dx, wait_time
    jb check_for_key
    add dx, 4
    mov wait_time, dx



    ; === eternal game loop:
    jmp game_loop


    stop_game:

    ; show cursor back:
    mov ah, 1
    mov ch, 0bh
    mov cl, 0bh
    int 10h

    ret

    ; ------ functions section ------

    ; this procedure creates the
    ; animation by moving all snake
    ; body parts one step to tail,
    ; the old tail goes away:
    ; [last part (tail)]-> goes away
    ; [part i] -> [part i+1]
    ; ....

    move_snake proc near

    ; set es to bios info segment:
    mov ax, 40h
    mov es, ax

    ; point di to tail
    mov di, s_size * 2 - 2
    ; move all body parts
    ; (last one simply goes away)
    mov cx, s_size-1
    move_array:
    mov ax, snake[di-2]
    mov snake[di], ax
    sub di, 2
    loop move_array


    cmp cur_dir, left
    je move_left
    cmp cur_dir, right
    je move_right
    cmp cur_dir, up
    je move_up
    cmp cur_dir, down
    je move_down

    jmp stop_move ; no direction.


    move_left:
    mov al, b.snake[0]
    dec al
    mov b.snake[0], al
    cmp al, -1
    jne stop_move
    mov al, es:[4ah] ; col number.
    dec al
    mov b.snake[0], al ; return to right.
    jmp stop_move

    move_right:
    mov al, b.snake[0]
    inc al
    mov b.snake[0], al
    cmp al, es:[4ah] ; col number.
    jb stop_move
    mov b.snake[0], 0 ; return to left.
    jmp stop_move

    move_up:
    mov al, b.snake[1]
    dec al
    mov b.snake[1], al
    cmp al, -1
    jne stop_move
    mov al, es:[84h] ; row number -1.
    mov b.snake[1], al ; return to bottom.
    jmp stop_move

    move_down:
    mov al, b.snake[1]
    inc al
    mov b.snake[1], al
    cmp al, es:[84h] ; row number -1.
    jbe stop_move
    mov b.snake[1], 0 ; return to top.
    jmp stop_move

    stop_move:
    ret
    move_snake endp


    موضوعات مشابه:
    فایل های پیوست شده
    توکل بخدا
    http://DeepLearning.ir
    اولین و تنها مرجع یادگیری عمیق ایران


    هرکس از ظن خود شد یار من
    از درون من نجست اسرار من




 

 

کاربران برچسب خورده در این موضوع

کلمات کلیدی این موضوع

علاقه مندی ها (Bookmarks)

علاقه مندی ها (Bookmarks)

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •  


Powered by vBulletin
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
Persian Language By Ustmb.ir
این انجمن کاملا مستقل بوده و هیچ ارتباطی با دانشگاه علوم و فنون مازندران و مسئولان آن ندارد..این انجمن و تمامی محتوای تولید شده در آن توسط دانشجویان فعلی و فارغ التحصیل ادوار گذشته این دانشگاه برای استفاده دانشجویان جدید این دانشگاه و جامعه دانشگاهی کشور فراهم شده است.لطفا برای اطلاعات بیشتر در رابطه با ماهیت انجمن با مدیریت انجمن ارتباط برقرار کنید
ساعت 07:40 AM بر حسب GMT +4 می باشد.