![]() |
#1
|
|||
|
|||
![]()
الرجاء المساعدة بهذا البرنامج
اكتب برنامج يطلب من المستخدم تعيين كلمة مرور تتكون من (n) من الحروف والرموز والارقام بحيث تحقق الشروط التالية : - لايقل طول كلمة السر عن ستة بايت - يجب ان تبداء كلمة السر بحرفcapital - يجب انت تنتهي كلمة السر برقم - يجب انت تحتوي كلمة السر على حرف small على الاقل - يجب ان تتكون كلمة السر من خليط من الاحرف والرموز 2- اكتب برنامج اخر يطلب من المستخدم ادخال كلمة مرور ومقارنتها بكلمة السر التي تم تعيينها في البرنامج السابق فاذا كانت صحيحة يتم طباعة عبارة "it' is correct" واذا كانت خاطئة يتم طباعة عبارة "try again" |
#2
|
|||
|
|||
![]()
model small
.stack 100h .data msg1 db "Enter the password",'$' org 200 ps db ?,'$' c=$-ps msg2 db "The password is done",'$' .code mov ax,@data mov ds,ax mov ah,9h mov dl,msg1 int 21h mov ah,Ah int 21h mov ps,al xor di,di mov di,c cmp di,6 jge then1 jmp end_if then1:cmp ps,'A' jge then2 jmp end_if then2: cmp ps,'Z' jl then3 jmp end_if then3: mov bx,[200+di] cmp bx,0 jge then4 jmp end_if then4: cmp bx,9 jl then5 jmp end_if then5: cmp [ps+1],'a' jge then6 inc ps mov cx,c-2 loop then5 jmp end_if then6: cmp [ps+1],'z' jl then7 jmp end_if then7: cmp [ps+1],21h jge then8 jmp then9 then8:cmp [ps+1],2fh jl then15 then9:cmp [ps+1],3ah jge then10 jmp then11 then10: cmp [ps+1],40h jl then15 then11:cmp[ps+1],50h jge then12 jmp then13 then12:cmp[ps+1],60h jl then15 then13:cmp[ps+1],7bh jge then14 inc ps loop then7 jmp end_if then14: cmp [ps+1],7eh jl then15 then15:mov ah,9h mov dl,ps int 21h mov ah,9h mov dl,msg2 int 21h jmp end_if end_if: mov ps,0h mov ah,4ch int 21h end البرنامج الاول ارجو التعديل علية اين الخطاء |
#3
|
|||
|
|||
![]()
.model small
.stack 100h .data msg1 db "Enter the password",'$' org 200 ps db ?,'$' c=$-ps msg2 db "The password is done",'$' .code mov ax,@data mov ds,ax mov ah,9h mov dl,msg1 int 21h mov ah,Ah int 21h mov ps,al xor di,di mov di,c cmp di,6 jge then1 jmp end_if then1:cmp ps,'A' jge then2 jmp end_if then2: cmp ps,'Z' jl then3 jmp end_if then3: mov bx,[200+di] cmp bx,0 jge then4 jmp end_if then4: cmp bx,9 jl then5 jmp end_if then5: cmp [ps+1],'a' jge then6 inc ps mov cx,c-2 loop then5 jmp end_if then6: cmp [ps+1],'z' jl then7 jmp end_if then7: cmp [ps+1],21h jge then8 jmp then9 then8:cmp [ps+1],2fh jl then15 then9:cmp [ps+1],3ah jge then10 jmp then11 then10: cmp [ps+1],40h jl then15 then11:cmp[ps+1],50h jge then12 jmp then13 then12:cmp[ps+1],60h jl then15 then13:cmp[ps+1],7bh jge then14 inc ps loop then7 jmp end_if then14: cmp [ps+1],7eh jl then15 then15:mov ah,9h mov dl,ps int 21h mov ah,9h mov dl,msg2 int 21h jmp end_if end_if: mov ps,0h mov ah,4ch int 21h end هذا البرنامج الثاني ارجوا التعديل ومعرفة اين الخطاء |
![]() |
مواقع النشر (المفضلة) |
أدوات الموضوع | |
انواع عرض الموضوع | |
|
|