Error : Pleaze hellp me
PUSHX MACRO
push ax
push bx
push cx
push dx
endm
POPX MACRO
POP DX
POP CX
POP BX
POP AX
ENDM
;------------------------
*******************************************
;----------------------------------------
PUSHX MACRO1
push ax
push bx
push cx
push dx
endm
;----------------------------------------
POPX MACRO1
POP DX
POP CX
POP BX
POP AX
ENDM
;----------------------------------------
SETDSP MACRO
LOCAL SET
PUSHX
MOV CX,25
SET: MOV DL,0AH
MOV AH,2
INT 21H
LOOP SET
MOV AH,2
MOV DL,0
MOV DH,0
INT 10H
POPX
ENDM
;----------------------------------------
NUMADSP MACRO Y,X,SYMB,STYLE
LOCAL A1,A2,A3,A4,SMALL,ENDD,A5
PUSHX
MOV AH,STYLE
CMP AH,2
JZ SMALL
MOV DH,Y
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
A1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A1
MOV DH,Y
ADD DH,1
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,12
A2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A2
MOV DH,Y
ADD DH,2
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
A3:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A3
MOV DH,Y
ADD DH,3
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,8
A4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A4
JMP ENDD
SMALL:
MOV DH,Y
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
A5:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A5
MOV DH,Y
ADD DH,1
MOV DL,X
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,1
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMDDSP MACRO Y,X,SYMB,STYLE
LOCAL D1,D2,D3,D4,SMALL,ENDD,D5
PUSHX
MOV AH,STYLE
CMP AH,2
JZ SMALL
MOV DH,Y
ADD DH,23
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
D1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP D1
MOV DH,Y
ADD DH,22
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,12
D2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP D2
MOV DH,Y
ADD DH,21
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
D3:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP D3
MOV DH,Y
ADD DH,20
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,8
D4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP D4
JMP ENDD
SMALL:
MOV DH,Y
ADD DH,7
MOV DL,X
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,7
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,8
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
D5:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP D5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMGDSP MACRO Y,X,SYMB,STYLE
LOCAL G1,G2,G3,G4,SMALL,ENDD,G5
PUSHX
MOV AH,STYLE
CMP AH,2
JZ SMALL
MOV DH,Y
ADD DH,11
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
G1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP G1
MOV DH,Y
ADD DH,10
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,8
G2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP G2
MOV DH,Y
ADD DH,12
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
G3:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP G3
MOV DH,Y
ADD DH,13
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,8
G4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP G4
JMP ENDD
SMALL:
MOV DH,Y
ADD DH,4
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
G5:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP G5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMFDSP MACRO Y,X,SYMB,STYLE
LOCAL F1,F2,F3,F4,SMALL,ENDD,F5,F6,NEXT
PUSHX
MOV AH,STYLE
CMP AH,2
JNZ NEXT
JMP NEAR PTR SMALL
NEXT: MOV DH,Y
ADD DH,2
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,3
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
F1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP F1
MOV CX,6
MOV DH,Y
ADD DH,4
MOV DL,X
ADD DL,1
F3: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,4
F2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP F2
POP DX
POP CX
INC DH
LOOP F3
MOV DH,Y
ADD DH,11
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,10
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
F4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP F4
JMP ENDD
SMALL:
MOV CX,3
MOV DH,Y
ADD DH,1
MOV DL,X
F5: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
POP DX
POP CX
INC DH
LOOP F5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMEDSP MACRO Y,X,SYMB,STYLE
LOCAL E1,E2,E3,E4,SMALL,ENDD,E5,E6,NEXT
PUSHX
MOV AH,STYLE
CMP AH,2
JNZ NEXT
JMP NEAR PTR SMALL
NEXT:
MOV DH,Y
ADD DH,12
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,13
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
E1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP E1
MOV CX,6
MOV DH,Y
ADD DH,14
MOV DL,X
ADD DL,1
E3: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,4
E2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP E2
POP DX
POP CX
INC DH
LOOP E3
MOV DH,Y
ADD DH,21
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,20
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
E4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP E4
JMP ENDD
SMALL:
MOV CX,3
MOV DH,Y
ADD DH,5
MOV DL,X
E5: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
POP DX
POP CX
INC DH
LOOP E5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMBDSP MACRO Y,X,SYMB,STYLE
LOCAL B1,B2,B3,B4,SMALL,ENDD,B5,B6,NEXT
PUSHX
MOV AH,STYLE
CMP AH,2
JNZ NEXT
JMP NEAR PTR SMALL
NEXT:
MOV DH,Y
ADD DH,2
MOV DL,X
ADD DL,13
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,3
MOV DL,X
ADD DL,12
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
B1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP B1
MOV CX,6
MOV DH,Y
ADD DH,4
MOV DL,X
ADD DL,11
B3: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,4
B2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP B2
POP DX
POP CX
INC DH
LOOP B3
MOV DH,Y
ADD DH,11
MOV DL,X
ADD DL,13
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,10
MOV DL,X
ADD DL,12
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
B4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP B4
JMP ENDD
SMALL:
MOV CX,3
MOV DH,Y
ADD DH,1
MOV DL,X
ADD DL,4
B5: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
POP DX
POP CX
INC DH
LOOP B5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMCDSP MACRO Y,X,SYMB,STYLE
LOCAL C1,C2,C3,C4,SMALL,ENDD,C5,C6,NEXT
PUSHX
MOV AH,STYLE
CMP AH,2
JNZ NEXT
JMP NEAR PTR SMALL
NEXT:
MOV DH,Y
ADD DH,12
MOV DL,X
ADD DL,13
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,13
MOV DL,X
ADD DL,12
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
C1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP C1
MOV CX,6
MOV DH,Y
ADD DH,14
MOV DL,X
ADD DL,11
C3: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,4
C2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP C2
POP DX
POP CX
INC DH
LOOP C3
MOV DH,Y
ADD DH,21
MOV DL,X
ADD DL,13
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,20
MOV DL,X
ADD DL,12
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
C4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP C4
JMP ENDD
SMALL:
MOV CX,3
MOV DH,Y
ADD DH,5
MOV DL,X
ADD DL,4
C5: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
POP DX
POP CX
INC DH
LOOP C5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
DSPNUM MACRO Y,X,SYBE,STLYE,VALUE
LOCAL ENDD,NEXT1,NEXT2,NEXT3,NEXT4,NEXT5,NEXT6,NEXT7,NEXT8,NEXT9,NEXT10
LOCAL NEXT11,NEXT12,NEXT13,NEXT14,NEXT15,NEXT16,NEXT17,NEXT18,NEXT19
LOCAL NEXT20,NEXT21,NEXT22,NEXT23,NEXT24,NEXT25,NEXT26,NEXT27,NEXT28
LOCAL NEXT29,NEXT30,NEXT31,
PUSHX
MOV CH,VALUE
CMP CH,0
JZ NEXT1
JMP NEAR PTR NEXT2
NEXT1:
NUMGDSP Y,X,' ',STLYE
NUMADSP Y,X,SYBE,STLYE
NUMBDSP Y,X,SYBE,STLYE
NUMCDSP Y,X,SYBE,STLYE
NUMDDSP Y,X,SYBE,STLYE
NUMEDSP Y,X,SYBE,STLYE
NUMFDSP Y,X,SYBE,STLYE
JMP NEAR PTR ENDD
NEXT2:
CMP CH,1
JZ NEXT3
JMP NEAR PTR NEXT4
NEXT3:
NUMADSP Y,X,' ',STLYE
NUMDDSP Y,X,' ',STLYE
NUMEDSP Y,X,' ',STLYE
NUMFDSP Y,X,' ',STLYE
NUMGDSP Y,X,' ',STLYE
NUMBDSP Y,X,SYBE,STLYE
NUMCDSP Y,X,SYBE,STLYE
JMP NEAR PTR ENDD
NEXT4:
CMP CH,2
JZ NEXT5
JMP NEAR PTR NEXT6
NEXT5:
NUMADS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MP NEAR PTR ENDD
NEXT24:
CMP CH,12
JZ NEXT25
JMP NEAR PTR NEXT26
NEXT25:
NUMGDSP Y,X,' ',STLYE
NUMBDSP Y,X,' ',STLYE
NUMCDSP Y,X,' ',STLYE
NUMADSP Y,X,SYBE,STLYE
NUMDDSP Y,X,SYBE,STLYE
NUMEDSP Y,X,SYBE,STLYE
NUMFDSP Y,X,SYBE,STLYE
JMP NEAR PTR ENDD
NEXT26:
CMP CH,13
JZ NEXT27
JMP NEAR PTR NEXT28
NEXT27:
NUMADSP Y,X,' ',STLYE
NUMFDSP Y,X,' ',STLYE
NUMBDSP Y,X,SYBE,STLYE
NUMCDSP Y,X,SYBE,STLYE
NUMDDSP Y,X,SYBE,STLYE
NUMEDSP Y,X,SYBE,STLYE
NUMGDSP Y,X,SYBE,STLYE
JMP NEAR PTR ENDD
NEXT28:
CMP CH,14
JZ NEXT29
JMP NEAR PTR NEXT30
NEXT29:
NUMADSP Y,X,SYBE,STLYE
NUMDDSP Y,X,SYBE,STLYE
NUMEDSP Y,X,SYBE,STLYE
NUMFDSP Y,X,SYBE,STLYE
NUMGDSP Y,X,SYBE,STLYE
NUMBDSP Y,X,' ',STLYE
NUMCDSP Y,X,' ',STLYE
JMP NEAR PTR ENDD
NEXT30:
CMP CH,15
JZ NEXT31
JMP NEAR PTR ENDD
NEXT31:
NUMCDSP Y,X,' ',STLYE
NUMDDSP Y,X,' ',STLYE
NUMADSP Y,X,SYBE,STLYE
NUMEDSP Y,X,SYBE,STLYE
NUMFDSP Y,X,SYBE,STLYE
NUMGDSP Y,X,SYBE,STLYE
NUMBDSP Y,X,' ',STLYE
JMP NEAR PTR ENDD
ENDD:
POPX
ENDM
;-------------------------------------------
DSPMAO MACRO Y,X,SYMB,STYLE
LOCAL SMALL,A1,A2,A3,A4,ENDD
PUSHX
MOV AX,STYLE
CMP AX,2
JZ SMALL
MOV DH,Y+6
MOV DL,X+1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,2
A1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A1
MOV DH,Y+7
MOV DL,X+1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,2
A2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A2
MOV DH,Y+16
MOV DL,X+1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,2
A3:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A3
MOV DH,Y+17
MOV DL,X+1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,2
A4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A4
JMP ENDD
small:
MOV DH,Y+2
MOV DL,X
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y+6
MOV DL,X
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;-----------------------------------
PASSNUM MACRO Y,X,SYMB,STYLE,VALUE
PUSHX
MOV BH,Y
MOV BL,X
MOV AL,SYMB
MOV CL,STYLE
MOV CH,VALUE
CALL DSPNUMB
POPX
ENDM
************************************************
DSEG SEGMENT 'DATA'
second db 0
minute db ?
hour db ?
pause db ?
WRITE DB 0FFH
WRITEX DB 0
CHANGE DB 0FFH
num db 0
num2 db 0
XX DB 254
DSPCTIME DB 0FFH
STR DB 'CHANGE SYBE$'
STR2 DB ' $'
DSEG ENDS
SSEG SEGMENT STACK 'STACK'
dw 100h dup(?)
SSEG ENDS
CSEG SEGMENT 'CODE'
assume cs:code,ds:data,ss:stack
START PROC FAR
; set segment registers:
push ds
mov ax,0
push ax
mov ax,DSEG ; ****inja data bod Error dasht man dseg neveshtam
mov ds,ax
INCLUDE BASIC.INC
INCLUDE DSP.INC
START0:
MOV AH,2CH
INT 21H
MOV SECOND,DH
MOV MINUTE,CL
MOV HOUR,CH
SETDSP
start1:
mov ah,0bh
int 21h
cmp al,0
jz next
mov ah,0
int 16h
CMP AL,'<'
JNZ NEXT0
DEC XX
NEXT0:
CMP AL,'>'
JNZ NEXT00
INC XX
NEXT00:
CMP AL,';'
JNZ NEXT000
XOR CHANGE,0FFH
PUSHX
MOV DH,24
MOV DL,0
MOV AH,2
INT 10H
MOV DX,OFFSET STR
MOV AH,9
INT 21H
POPX
NEXTSY:
mov ah,0bh
int 21h
cmp al,0
jz next0001
mov ah,0
int 16h
CMP AL,0DH
JNZ NEXT0000
XOR CHANGE,0FFH
PUSHX
MOV DH,24
MOV DL,0
MOV AH,2
INT 10H
MOV DX,OFFSET STR2
MOV AH,9
INT 21H
POPX
JMP NEXT000
NEXT0000:
MOV XX,AL
next0001:
JMP NEAR PTR NEXT3
NEXT000:
cmp al,'.'
jnz next
mov pause,'.'
next:
cmp al,','
jnz NEXT1
XOR DSPCTIME,0FFH
NEXT1:
CMP AL,']'
JNZ NEXT2
RET
NEXT2:
CMP AL,'/'
JNZ NEXT120
JMP NEAR PTR START0
NEXT120:
CMP AL,'['
Jz NEXT33
NEXT30: jmp near ptr next3
next33:
XOR WRITE,0FFH
;-------------------------------------write time
cmp write,0
jz next30
writetime:
mov ah,0bh
int 21h
cmp al,0
jz next30
mov ah,0
int 16h
cmp al,0dh
cmp al,'='
jnz nextb
cmp writex,0
jnz nexta1
nexta0: add writex,16
jmp nextn
nexta1:
cmp writex,16
jnz nexta2
add writex,20
jmp nextn
nexta2:
cmp writex,36
jz nexta0
nextb:
cmp al,'-'
jnz nextm
cmp writex,52
jnz nextb1
nextb0: sub writex,16
jmp nextn
nextb1:
cmp writex,36
jnz nextb2
sub writex,20
jmp nextn
nextb2:
cmp writex,16
jz nextb0
jmp nextm
nextn0: jmp near ptr nextn
;-------------------------------------- move pos
nextm:
push ax ; save input
cmp al,40h
jb nextnn
jmp nextn0
nextnn:
cmp al,30h
jb nextn0
sub al,30h
mov num,al
;-------------------------------------- check number
cmp writex,0
jnz nextm1
mov al,hour
MOV aH,0
MOV CH,10
DIV CH
mov num2,ah
mov al,num
MOV CH,10
mul ch
add al,num2
mov hour,al
jmp nextn
nextm1:
cmp writex,16
jnz nextm2
mov al,hour
MOV aH,0
MOV CH,10
DIV CH
MOV CH,10
mul ch
add al,num
mov hour,al
nextm2:
cmp writex,36
jnz nextm3
mov al,minute
MOV aH,0
MOV CH,10
DIV CH
mov num2,ah
mov al,num
MOV CH,10
mul ch
add al,num2
mov minute,al
jmp nextn
nextm3:
cmp writex,52
jnz nextn
mov al,minute
MOV aH,0
MOV CH,10
DIV CH
MOV CH,10
mul ch
add al,num
mov minute,al
nextn:
pop ax
cmp al,0dh
jnz next3
mov writex,0
mov write,0ffh
;--------------------------------------
NEXT3:
MOV BH,XX
DSPMAO 0,32,BH,0
cmp pause,'.'
jnz goon1
mov ah,08
int 21h
cmp pause,al
jz goon1
jmp near ptr next
goon1:
mov pause,0
MOV CX,65535
call waitf
MOV CX,65535
call waitf
MOV CX,65535
call waitf
MOV CX,65535
call waitf
MOV CX,65535
call waitf
DSPMAO 0,32,' ',0
MOV CX,65535
call waitf
MOV CX,35535
call waitf
MOV CX,65535
call waitf
MOV CX,65535
call waitf
cmp write,0
jz next7
jmp near ptr aa
;------------------------------------
NEXT7:
PASSNUM 0,WRITEX,' ',0,8
aa:
;-----------------------------------
MOV CX,65535
call waitf
MOV CX,65535
call waitf
MOV CX,40000
call waitf
inc second
cmp second,60
jnz NEXT8
mov second,0
inc minute
jmp NEXT8
NEXT8:
cmp minute,60
jb NEXT9
mov minute,0
inc hour
jmp NEXT9
NEXT9:
cmp hour,24
jb NEXT10
mov hour,0
jmp NEXT10
NEXT10:
mov ch,hour
mov cl,minute
mov dh,second
;--------------------------------
CMP DSPCTIME,0FFH
JZ NEXT11
JMP NEAR PTR START1
NEXT11:
PUSH CX
XCHG CH,CL
MOV CH,0
MOV AX,CX
MOV CH,10
DIV CH
PASSNUM 0,16,XX,0,AH
MOV AH,AL
PASSNUM 0,0,XX,0,AH
POP CX
MOV CH,0
MOV AX,CX
MOV CH,10
DIV CH
PASSNUM 00,52,XX,0,AH
MOV AH,AL
PASSNUM 00,36,XX,0,AH
MOV CX,DX
PUSH DX
XCHG CH,CL
MOV CH,0
MOV AX,CX
MOV CH,10
DIV CH
PASSNUM 0,75,XX,2,AH
MOV AH,AL
PASSNUM 0,69,XX,2,AH
CMP CHANGE,0
JNZ NEXT13
JMP NEAR PTR NEXTSY
NEXT13:
cmp write,0
jnz next12
jmp near ptr writetime
next12:
jmp near ptr start1
endd:
ret
;--------------------------------
DSPNUMB PROC NEAR
DSPNUM BH,BL,AL,CL,CH ;***** fekonam BH ro ba DH bayad taghir bedim in karo katdam valy bazam dorost nashod
RET
DSPNUMB ENDP
;--------------------------------
waitf proc near
push ax
waitf1:
in al,61h
and al,10h
cmp al,ah
je waitf1
mov ah,al
loop waitf1
pop ax
ret
waitf endp
;--------------------------------
ret
; add your code here
;; ******** Dastorate paien hazf shavad
MOV AX, 4C00h ; exit to operating system.
INT 21h
START ENDP
CSEG ENDS
END START ; set entry point.
We aren't going to do your homework for you!
But here are some hints!
; Insert your code between the [ code] and [ /code] declarations
COMMENT THE CODE, so you can understand it better!
Error : Pleaze hellp me
PUSHX MACRO
push ax
push bx
push cx
push dx
endm
POPX MACRO
POP DX
POP CX
POP BX
POP AX
ENDM
;------------------------
*******************************************
;----------------------------------------
PUSHX MACRO1
push ax
push bx
push cx
push dx
endm
;----------------------------------------
POPX MACRO1
POP DX
POP CX
POP BX
POP AX
ENDM
;----------------------------------------
SETDSP MACRO
LOCAL SET
PUSHX
MOV CX,25
SET: MOV DL,0AH
MOV AH,2
INT 21H
LOOP SET
MOV AH,2
MOV DL,0
MOV DH,0
INT 10H
POPX
ENDM
;----------------------------------------
NUMADSP MACRO Y,X,SYMB,STYLE
LOCAL A1,A2,A3,A4,SMALL,ENDD,A5
PUSHX
MOV AH,STYLE
CMP AH,2
JZ SMALL
MOV DH,Y
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
A1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A1
MOV DH,Y
ADD DH,1
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,12
A2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A2
MOV DH,Y
ADD DH,2
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
A3:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A3
MOV DH,Y
ADD DH,3
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,8
A4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A4
JMP ENDD
SMALL:
MOV DH,Y
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
A5:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A5
MOV DH,Y
ADD DH,1
MOV DL,X
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,1
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMDDSP MACRO Y,X,SYMB,STYLE
LOCAL D1,D2,D3,D4,SMALL,ENDD,D5
PUSHX
MOV AH,STYLE
CMP AH,2
JZ SMALL
MOV DH,Y
ADD DH,23
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
D1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP D1
MOV DH,Y
ADD DH,22
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,12
D2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP D2
MOV DH,Y
ADD DH,21
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
D3:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP D3
MOV DH,Y
ADD DH,20
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,8
D4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP D4
JMP ENDD
SMALL:
MOV DH,Y
ADD DH,7
MOV DL,X
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,7
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,8
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
D5:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP D5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMGDSP MACRO Y,X,SYMB,STYLE
LOCAL G1,G2,G3,G4,SMALL,ENDD,G5
PUSHX
MOV AH,STYLE
CMP AH,2
JZ SMALL
MOV DH,Y
ADD DH,11
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
G1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP G1
MOV DH,Y
ADD DH,10
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,8
G2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP G2
MOV DH,Y
ADD DH,12
MOV DL,X
ADD DL,3
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,10
G3:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP G3
MOV DH,Y
ADD DH,13
MOV DL,X
ADD DL,4
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,8
G4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP G4
JMP ENDD
SMALL:
MOV DH,Y
ADD DH,4
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
G5:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP G5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMFDSP MACRO Y,X,SYMB,STYLE
LOCAL F1,F2,F3,F4,SMALL,ENDD,F5,F6,NEXT
PUSHX
MOV AH,STYLE
CMP AH,2
JNZ NEXT
JMP NEAR PTR SMALL
NEXT: MOV DH,Y
ADD DH,2
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,3
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
F1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP F1
MOV CX,6
MOV DH,Y
ADD DH,4
MOV DL,X
ADD DL,1
F3: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,4
F2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP F2
POP DX
POP CX
INC DH
LOOP F3
MOV DH,Y
ADD DH,11
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,10
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
F4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP F4
JMP ENDD
SMALL:
MOV CX,3
MOV DH,Y
ADD DH,1
MOV DL,X
F5: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
POP DX
POP CX
INC DH
LOOP F5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMEDSP MACRO Y,X,SYMB,STYLE
LOCAL E1,E2,E3,E4,SMALL,ENDD,E5,E6,NEXT
PUSHX
MOV AH,STYLE
CMP AH,2
JNZ NEXT
JMP NEAR PTR SMALL
NEXT:
MOV DH,Y
ADD DH,12
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,13
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
E1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP E1
MOV CX,6
MOV DH,Y
ADD DH,14
MOV DL,X
ADD DL,1
E3: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,4
E2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP E2
POP DX
POP CX
INC DH
LOOP E3
MOV DH,Y
ADD DH,21
MOV DL,X
ADD DL,2
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,20
MOV DL,X
ADD DL,1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
E4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP E4
JMP ENDD
SMALL:
MOV CX,3
MOV DH,Y
ADD DH,5
MOV DL,X
E5: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
POP DX
POP CX
INC DH
LOOP E5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMBDSP MACRO Y,X,SYMB,STYLE
LOCAL B1,B2,B3,B4,SMALL,ENDD,B5,B6,NEXT
PUSHX
MOV AH,STYLE
CMP AH,2
JNZ NEXT
JMP NEAR PTR SMALL
NEXT:
MOV DH,Y
ADD DH,2
MOV DL,X
ADD DL,13
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,3
MOV DL,X
ADD DL,12
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
B1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP B1
MOV CX,6
MOV DH,Y
ADD DH,4
MOV DL,X
ADD DL,11
B3: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,4
B2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP B2
POP DX
POP CX
INC DH
LOOP B3
MOV DH,Y
ADD DH,11
MOV DL,X
ADD DL,13
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,10
MOV DL,X
ADD DL,12
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
B4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP B4
JMP ENDD
SMALL:
MOV CX,3
MOV DH,Y
ADD DH,1
MOV DL,X
ADD DL,4
B5: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
POP DX
POP CX
INC DH
LOOP B5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
NUMCDSP MACRO Y,X,SYMB,STYLE
LOCAL C1,C2,C3,C4,SMALL,ENDD,C5,C6,NEXT
PUSHX
MOV AH,STYLE
CMP AH,2
JNZ NEXT
JMP NEAR PTR SMALL
NEXT:
MOV DH,Y
ADD DH,12
MOV DL,X
ADD DL,13
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,13
MOV DL,X
ADD DL,12
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
C1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP C1
MOV CX,6
MOV DH,Y
ADD DH,14
MOV DL,X
ADD DL,11
C3: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,4
C2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP C2
POP DX
POP CX
INC DH
LOOP C3
MOV DH,Y
ADD DH,21
MOV DL,X
ADD DL,13
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y
ADD DH,20
MOV DL,X
ADD DL,12
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,3
C4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP C4
JMP ENDD
SMALL:
MOV CX,3
MOV DH,Y
ADD DH,5
MOV DL,X
ADD DL,4
C5: PUSH CX
PUSH DX
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
POP DX
POP CX
INC DH
LOOP C5
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;----------------------------------------
DSPNUM MACRO Y,X,SYBE,STLYE,VALUE
LOCAL ENDD,NEXT1,NEXT2,NEXT3,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LYE
NUMGDSP Y,X,SYBE,STLYE
JMP NEAR PTR ENDD
NEXT18:
CMP CH,9
JZ NEXT19
JMP NEAR PTR NEXT20
NEXT19:
NUMEDSP Y,X,' ',STLYE
NUMADSP Y,X,SYBE,STLYE
NUMBDSP Y,X,SYBE,STLYE
NUMCDSP Y,X,SYBE,STLYE
NUMDDSP Y,X,SYBE,STLYE
NUMFDSP Y,X,SYBE,STLYE
NUMGDSP Y,X,SYBE,STLYE
JMP NEAR PTR ENDD
NEXT20:
CMP CH,10
JZ NEXT21
JMP NEAR PTR NEXT22
NEXT21:
NUMDDSP Y,X,' ',STLYE
NUMADSP Y,X,SYBE,STLYE
NUMBDSP Y,X,SYBE,STLYE
NUMCDSP Y,X,SYBE,STLYE
NUMEDSP Y,X,SYBE,STLYE
NUMFDSP Y,X,SYBE,STLYE
NUMGDSP Y,X,SYBE,STLYE
JMP NEAR PTR ENDD
NEXT22:
CMP CH,11
JZ NEXT23
JMP NEAR PTR NEXT24
NEXT23:
NUMADSP Y,X,' ',STLYE
NUMBDSP Y,X,' ',STLYE
NUMCDSP Y,X,SYBE,STLYE
NUMDDSP Y,X,SYBE,STLYE
NUMEDSP Y,X,SYBE,STLYE
NUMFDSP Y,X,SYBE,STLYE
NUMGDSP Y,X,SYBE,STLYE
JMP NEAR PTR ENDD
NEXT24:
CMP CH,12
JZ NEXT25
JMP NEAR PTR NEXT26
NEXT25:
NUMGDSP Y,X,' ',STLYE
NUMBDSP Y,X,' ',STLYE
NUMCDSP Y,X,' ',STLYE
NUMADSP Y,X,SYBE,STLYE
NUMDDSP Y,X,SYBE,STLYE
NUMEDSP Y,X,SYBE,STLYE
NUMFDSP Y,X,SYBE,STLYE
JMP NEAR PTR ENDD
NEXT26:
CMP CH,13
JZ NEXT27
JMP NEAR PTR NEXT28
NEXT27:
NUMADSP Y,X,' ',STLYE
NUMFDSP Y,X,' ',STLYE
NUMBDSP Y,X,SYBE,STLYE
NUMCDSP Y,X,SYBE,STLYE
NUMDDSP Y,X,SYBE,STLYE
NUMEDSP Y,X,SYBE,STLYE
NUMGDSP Y,X,SYBE,STLYE
JMP NEAR PTR ENDD
NEXT28:
CMP CH,14
JZ NEXT29
JMP NEAR PTR NEXT30
NEXT29:
NUMADSP Y,X,SYBE,STLYE
NUMDDSP Y,X,SYBE,STLYE
NUMEDSP Y,X,SYBE,STLYE
NUMFDSP Y,X,SYBE,STLYE
NUMGDSP Y,X,SYBE,STLYE
NUMBDSP Y,X,' ',STLYE
NUMCDSP Y,X,' ',STLYE
JMP NEAR PTR ENDD
NEXT30:
CMP CH,15
JZ NEXT31
JMP NEAR PTR ENDD
NEXT31:
NUMCDSP Y,X,' ',STLYE
NUMDDSP Y,X,' ',STLYE
NUMADSP Y,X,SYBE,STLYE
NUMEDSP Y,X,SYBE,STLYE
NUMFDSP Y,X,SYBE,STLYE
NUMGDSP Y,X,SYBE,STLYE
NUMBDSP Y,X,' ',STLYE
JMP NEAR PTR ENDD
ENDD:
POPX
ENDM
;-------------------------------------------
DSPMAO MACRO Y,X,SYMB,STYLE
LOCAL SMALL,A1,A2,A3,A4,ENDD
PUSHX
MOV AX,STYLE
CMP AX,2
JZ SMALL
MOV DH,Y+6
MOV DL,X+1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,2
A1:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A1
MOV DH,Y+7
MOV DL,X+1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,2
A2:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A2
MOV DH,Y+16
MOV DL,X+1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,2
A3:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A3
MOV DH,Y+17
MOV DL,X+1
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV CX,2
A4:
MOV DL,SYMB
MOV AH,02
INT 21H
LOOP A4
JMP ENDD
small:
MOV DH,Y+2
MOV DL,X
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
MOV DH,Y+6
MOV DL,X
MOV AH,2
PUSH BX
MOV BX,0
INT 10H
POP BX
MOV DL,SYMB
MOV AH,02
INT 21H
ENDD:
MOV DH,24
MOV DL,0
MOV AH,2
PUSH BX
PUSH BX
MOV BX,0
INT 10H
POP BX
POPX
ENDM
;-----------------------------------
PASSNUM MACRO Y,X,SYMB,STYLE,VALUE
PUSHX
MOV BH,Y
MOV BL,X
MOV AL,SYMB
MOV CL,STYLE
MOV CH,VALUE
CALL DSPNUMB
POPX
ENDM
************************************************
DSEG SEGMENT 'DATA'
second db 0
minute db ?
hour db ?
pause db ?
WRITE DB 0FFH
WRITEX DB 0
CHANGE DB 0FFH
num db 0
num2 db 0
XX DB 254
DSPCTIME DB 0FFH
STR DB 'CHANGE SYBE$'
STR2 DB ' $'
DSEG ENDS
SSEG SEGMENT STACK 'STACK'
dw 100h dup(?)
SSEG ENDS
CSEG SEGMENT 'CODE'
assume cs:code,ds:data,ss:stack
START PROC FAR
; set segment registers:
push ds
mov ax,0
push ax
mov ax,DSEG ; ****inja data bod Error dasht man dseg neveshtam
mov ds,ax
INCLUDE BASIC.INC
INCLUDE DSP.INC
START0:
MOV AH,2CH
INT 21H
MOV SECOND,DH
MOV MINUTE,CL
MOV HOUR,CH
SETDSP
start1:
mov ah,0bh
int 21h
cmp al,0
jz next
mov ah,0
int 16h
CMP AL,'<'
JNZ NEXT0
DEC XX
NEXT0:
CMP AL,'>'
JNZ NEXT00
INC XX
NEXT00:
CMP AL,';'
JNZ NEXT000
XOR CHANGE,0FFH
PUSHX
MOV DH,24
MOV DL,0
MOV AH,2
INT 10H
MOV DX,OFFSET STR
MOV AH,9
INT 21H
POPX
NEXTSY:
mov ah,0bh
int 21h
cmp al,0
jz next0001
mov ah,0
int 16h
CMP AL,0DH
JNZ NEXT0000
XOR CHANGE,0FFH
PUSHX
MOV DH,24
MOV DL,0
MOV AH,2
INT 10H
MOV DX,OFFSET STR2
MOV AH,9
INT 21H
POPX
JMP NEXT000
NEXT0000:
MOV XX,AL
next0001:
JMP NEAR PTR NEXT3
NEXT000:
cmp al,'.'
jnz next
mov pause,'.'
next:
cmp al,','
jnz NEXT1
XOR DSPCTIME,0FFH
NEXT1:
CMP AL,']'
JNZ NEXT2
RET
NEXT2:
CMP AL,'/'
JNZ NEXT120
JMP NEAR PTR START0
NEXT120:
CMP AL,'['
Jz NEXT33
NEXT30: jmp near ptr next3
next33:
XOR WRITE,0FFH
;-------------------------------------write time
cmp write,0
jz next30
writetime:
mov ah,0bh
int 21h
cmp al,0
jz next30
mov ah,0
int 16h
cmp al,0dh
cmp al,'='
jnz nextb
cmp writex,0
jnz nexta1
nexta0: add writex,16
jmp nextn
nexta1:
cmp writex,16
jnz nexta2
add writex,20
jmp nextn
nexta2:
cmp writex,36
jz nexta0
nextb:
cmp al,'-'
jnz nextm
cmp writex,52
jnz nextb1
nextb0: sub writex,16
jmp nextn
nextb1:
cmp writex,36
jnz nextb2
sub writex,20
jmp nextn
nextb2:
cmp writex,16
jz nextb0
jmp nextm
nextn0: jmp near ptr nextn
;-------------------------------------- move pos
nextm:
push ax ; save input
cmp al,40h
jb nextnn
jmp nextn0
nextnn:
cmp al,30h
jb nextn0
sub al,30h
mov num,al
;-------------------------------------- check number
cmp writex,0
jnz nextm1
mov al,hour
MOV aH,0
MOV CH,10
DIV CH
mov num2,ah
mov al,num
MOV CH,10
mul ch
add al,num2
mov hour,al
jmp nextn
nextm1:
cmp writex,16
jnz nextm2
mov al,hour
MOV aH,0
MOV CH,10
DIV CH
MOV CH,10
mul ch
add al,num
mov hour,al
nextm2:
cmp writex,36
jnz nextm3
mov al,minute
MOV aH,0
MOV CH,10
DIV CH
mov num2,ah
mov al,num
MOV CH,10
mul ch
add al,num2
mov minute,al
jmp nextn
nextm3:
cmp writex,52
jnz nextn
mov al,minute
MOV aH,0
MOV CH,10
DIV CH
MOV CH,10
mul ch
add al,num
mov minute,al
nextn:
pop ax
cmp al,0dh
jnz next3
mov writex,0
mov write,0ffh
;--------------------------------------
NEXT3:
MOV BH,XX
DSPMAO 0,32,BH,0
cmp pause,'.'
jnz goon1
mov ah,08
int 21h
cmp pause,al
jz goon1
jmp near ptr next
goon1:
mov pause,0
MOV CX,65535
call waitf
MOV CX,65535
call waitf
MOV CX,65535
call waitf
MOV CX,65535
call waitf
MOV CX,65535
call waitf
DSPMAO 0,32,' ',0
MOV CX,65535
call waitf
MOV CX,35535
call waitf
MOV CX,65535
call waitf
MOV CX,65535
call waitf
cmp write,0
jz next7
jmp near ptr aa
;------------------------------------
NEXT7:
PASSNUM 0,WRITEX,' ',0,8
aa:
;-----------------------------------
MOV CX,65535
call waitf
MOV CX,65535
call waitf
MOV CX,40000
call waitf
inc second
cmp second,60
jnz NEXT8
mov second,0
inc minute
jmp NEXT8
NEXT8:
cmp minute,60
jb NEXT9
mov minute,0
inc hour
jmp NEXT9
NEXT9:
cmp hour,24
jb NEXT10
mov hour,0
jmp NEXT10
NEXT10:
mov ch,hour
mov cl,minute
mov dh,second
;--------------------------------
CMP DSPCTIME,0FFH
JZ NEXT11
JMP NEAR PTR START1
NEXT11:
PUSH CX
XCHG CH,CL
MOV CH,0
MOV AX,CX
MOV CH,10
DIV CH
PASSNUM 0,16,XX,0,AH
MOV AH,AL
PASSNUM 0,0,XX,0,AH
POP CX
MOV CH,0
MOV AX,CX
MOV CH,10
DIV CH
PASSNUM 00,52,XX,0,AH
MOV AH,AL
PASSNUM 00,36,XX,0,AH
MOV CX,DX
PUSH DX
XCHG CH,CL
MOV CH,0
MOV AX,CX
MOV CH,10
DIV CH
PASSNUM 0,75,XX,2,AH
MOV AH,AL
PASSNUM 0,69,XX,2,AH
CMP CHANGE,0
JNZ NEXT13
JMP NEAR PTR NEXTSY
NEXT13:
cmp write,0
jnz next12
jmp near ptr writetime
next12:
jmp near ptr start1
endd:
ret
;--------------------------------
DSPNUMB PROC NEAR
DSPNUM BH,BL,AL,CL,CH ;***** fekonam BH ro ba DH bayad taghir bedim in karo katdam valy bazam dorost nashod
RET
DSPNUMB ENDP
;--------------------------------
waitf proc near
push ax
waitf1:
in al,61h
and al,10h
cmp al,ah
je waitf1
mov ah,al
loop waitf1
pop ax
ret
waitf endp
;--------------------------------
ret
; add your code here
;; ******** Dastorate paien hazf shavad
MOV AX, 4C00h ; exit to operating system.
INT 21h
START ENDP
CSEG ENDS
END START ; set entry point
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.