-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path200656_COAL Final Project.txt
810 lines (672 loc) · 23.4 KB
/
200656_COAL Final Project.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
;
; _______________________________________________________________Cash and Carry_______________________________________________________________________
; | |
; | * Documnetation: |
; | ^^^^^^^^^^^^^^ |
; | In this cash and carry we have three sections: |
; | -> Grocery, Stationary and lastly Vegetable area. |
; | -> Each section has three products which user can buy. |
; | |
; | Cash and Carry also have membership policy according to which if user is a member than get discount on items. |
; | We ask user If he is a member or not and in which section he wants to went in. |
; | |
; | If user is not a membver then he can went in section of his choice and buy any product and as much he wants. |
; | If he is a member than he is asked to enter membership code which he is told at time of getting membership. |
; | |
; | If code is correct then he can get discount on products. |
; | |
; | Lastly, when user wants to exit then enters 0 and bill is displayed |
; | |
; | On bill total amount user has to pay is displayed. |
; | When user enters amount then cash returned is displayed and user gets greetings of thanks for using our cash and carry |
; | |
; | |
; |________________________________________________________________Documentation_______________________________________________________________________|
;
;
INCLUDE Irvine32.inc
.data
;
; ___________________________________________________________________________________________________________________________________________________
; | |
; | ->Setting all strings or statemnents which has to b displayed on console |
; | ->all names of variables are set according to their console screen on which they have to displayed or according to their functionality |
; | |
; |___________________________________________________________________________________________________________________________________________________|
;
mainPrompt BYTE "___________________________________________________Cash and Carry_______________________________________________________", 0
inputMain SDWORD ?
; These Variables has to be displayed on main screen
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
promptExit BYTE "Enter 0 to exit... :) ", 0
promptMain1 BYTE "Sections Available: ", 0
promptMain2 BYTE "1- Grocery Area. ", 0
promptMain3 BYTE "2- Stationary Area. ", 0
promptMain4 BYTE "3- Vegetable Area. ", 0
promptMain5 BYTE "Enter Section serial you want to get in: ", 0
promptMain6 BYTE "Enter 4 If you have Membership...", 0
; These have to be displayed on normal user screen without discount
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
prompGrocery1 BYTE "Items Available in Grocery are: ", 0
prompGrocery2 BYTE "1- Bread..............................Rs 100\- ", 0
prompGrocery3 BYTE "2- Milk...............................Rs 250\- ", 0
prompGrocery4 BYTE "3- Egg(Dozen).........................Rs 150\- ", 0
prompGrocery5 BYTE "Enter item serial you want to buy: ", 0
; These have to be displayed on normal user screen without discount
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
prompStationary1 BYTE "Items Available in Stationary are: ", 0
prompStationary2 BYTE "1- Register........................Rs 300\- ", 0
prompStationary3 BYTE "2- geometry........................Rs 050\- ", 0
prompStationary4 BYTE "3- Pen.............................Rs 010\- ", 0
prompStationary5 BYTE "Enter item serial you want to buy: ", 0
; These have to be displayed on normal user screen without discount
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
prompVegetable1 BYTE "Items Available in Vegetables are: ", 0
prompVegetable2 BYTE "1- Tomato(per Kilo).................Rs 150\- ", 0
prompVegetable3 BYTE "2- Potato(per Kilo).................Rs 100\- ", 0
prompVegetable4 BYTE "3- Onion(per Kilo)..................Rs 050\- ", 0
prompVegetable5 BYTE "Enter item serial you want to buy: ", 0
; As according to their name they are used for billing system.
; -> bill and returned are carriers for values of bill and other have to be displayed on console
bill SDWORD ?
returned SDWORD ?
prompBill1 BYTE "Bill: ", 0
prompBill2 BYTE "Please Enter bill: ", 0
prompBill3 BYTE "Cash Returned: ", 0
prompBill4 BYTE "Thanks for shopping :) ",
; These have to be displayed on user screen with discount
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
prompGroceryMember1 BYTE "Items Available in Grocery are: ", 0
prompGroceryMember2 BYTE "1- Bread..............................Rs 070\- ", 0
prompGroceryMember3 BYTE "2- Milk...............................Rs 200\- ", 0
prompGroceryMember4 BYTE "3- Egg(Dozen).........................Rs 100\- ", 0
prompGroceryMember5 BYTE "Enter item serial you want to buy: ", 0
; These have to be displayed on user screen with discount
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
prompStationaryMember1 BYTE "Items Available in Stationary are: ", 0
prompStationaryMember2 BYTE "1- Register........................Rs 200\- ", 0
prompStationaryMember3 BYTE "2- geometry........................Rs 025\- ", 0
prompStationaryMember4 BYTE "3- Pen.............................Rs 010\- ", 0
prompStationaryMember5 BYTE "Enter item serial you want to buy: ", 0
; These have to be displayed on user screen with discount
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
prompVegetableMember1 BYTE "Items Available in Vegetables are: ", 0
prompVegetableMember2 BYTE "1- Tomato(per Kilo).................Rs 100\- ", 0
prompVegetableMember3 BYTE "2- Potato(per Kilo).................Rs 080\- ", 0
prompVegetableMember4 BYTE "3- Onion(per Kilo)..................Rs 030\- ", 0
prompVegetableMember5 BYTE "Enter item serial you want to buy: ", 0
passwordPrompt BYTE "Enter Membership password: ", 0
.code
main PROC
;
; _____________________________________________________________________________________
; | |
; | * It is based on If else or While loop. |
; | * First control enters loop and ask user for input. |
; | * Control enters in section of users choice. |
; | |
; | * Program is based on Procedures. |
; | * Every function which is performed is encapsulated in functions. |
; | |
; | * Loop iterates on value of ebx register. |
; | * If its value becomes 0 or less than 0 then it terminates else it iterates. |
; | |
; | * Note: |
; | -> Comments which will be same for all lines so defined only once |
; |_____________________________________________________________________________________|
;
;
;
mov bill, 0
mov returned, 0
mov ebx, 1
.WHILE ebx > 0
call mainMenu
call Input ; Calling Input Procedure
; ^^^^^^^^^^^^^^^^^^^^^^^
.IF inputMain == 1 ; Enters if user with no discount wents in grocery
call groceryMenu ; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
call Input ;
;
.IF inputMain == 1 ;
add bill, 100 ; Calculating Bill
mov inputMain, 5 ; ^^^^^^^^^^^^^^^^
.ENDIF ;
.IF inputMain == 2
add bill, 250
mov inputMain, 5
.ENDIF
.IF inputMain == 3
add bill, 150
mov inputMain, 5
.ENDIF
.IF inputMain == 0
mov ebx, 0
.ENDIF
.ENDIF
.IF inputMain == 2 ; Enters if user with no discount wents in stationary
call stationaryMenu ; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
call Input
.IF inputMain == 1
add bill, 300
mov inputMain, 5
.ENDIF
.IF inputMain == 2
add bill, 50
mov inputMain, 5
.ENDIF
.IF inputMain == 3
add bill, 10
mov inputMain, 5
.ENDIF
.IF inputMain == 0
mov ebx, 0
.ENDIF
.ENDIF
.IF inputMain == 3 ; Enters if user with no discount wents in vegetable
call vegetableMenu ; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
call Input
.IF inputMain == 1
add bill, 150
mov inputMain, 5
.ENDIF
.IF inputMain == 2
add bill, 100
mov inputMain, 5
.ENDIF
.IF inputMain == 3
add bill, 50
mov inputMain, 5
.ENDIF
.IF inputMain == 0
mov ebx, 0
.ENDIF
.ENDIF
.IF inputMain == 4 ; Enters if user is a member and ask for password
call passwordPromptMember ; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;
.IF inputMain == 1234 ; Enters if password is correct
call mainMenuMember ; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
call Input
.IF inputMain == 1
call groceryMemberMenu
call Input
.IF inputMain == 1
add bill, 070
mov inputMain, 5
.ENDIF
.IF inputMain == 2
add bill, 200
mov inputMain, 5
.ENDIF
.IF inputMain == 3
add bill, 100
mov inputMain, 5
.ENDIF
.IF inputMain == 0
mov ebx, 0
.ENDIF
.ENDIF
.IF inputMain == 2
call stationaryMemberMenu
call Input
.IF inputMain == 1
add bill, 200
mov inputMain, 5
.ENDIF
.IF inputMain == 2
add bill, 25
mov inputMain, 5
.ENDIF
.IF inputMain == 3
add bill, 10
mov inputMain, 5
.ENDIF
.IF inputMain == 0
mov ebx, 0
.ENDIF
.ENDIF
.IF inputMain == 3
call vegetableMemberMenu
call Input
.IF inputMain == 1
add bill, 100
mov inputMain, 5
.ENDIF
.IF inputMain == 2
add bill, 80
mov inputMain, 5
.ENDIF
.IF inputMain == 3
add bill, 30
mov inputMain, 5
.ENDIF
.IF inputMain == 0
mov ebx, 0
.ENDIF
.ENDIF
.ENDIF
.IF inputMain == 0 ; Enters if user wants to exit and enters 0
mov ebx, 0 ; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.ENDIF
.ENDIF
.IF inputMain == 0
mov ebx, 0
.ENDIF
.ENDW
call displayBill ; Calling Bill procedure to display bill and perform all calculations
call WaitMsg ; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
main ENDP
;
; _______________________________________________________________________________________
; | |
; |....As already told program is procedure based So all procedures are defined below. |
; |....Procedures names are set according to their functionality. |
; |_______________________________________________________________________________________|
;
;
;
;....Procedure to Input Password
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^
passwordPromptMember PROC ; _______________________________________________
call CLRSCR ; | Calling function to clear previous screen |
; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
mov eax,yellow + (brown * 32) ; | Setting colour of console |
call SetTextColor ; | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
; | |
mov edx , OFFSET mainPrompt ; | Displaying message to user |
call WriteString ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
call CRLF ; |_______________________________________________|
Call CRLF
call CRLF
Call CRLF
mov edx , OFFSET passwordPrompt
call WriteString
call CRLF
Call CRLF
call Input
ret
passwordPromptMember ENDP
;....Procedure for Getting input from user
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Input PROC ; _______________________________________________
pushad ; | Function to get input from the user |
call ReadInt ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
mov inputMain,eax ; | Uses built in function call ReadInt |
popad ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
; | Moves input from eax to variable |
ret ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Input ENDP ; |_______________________________________________|
;....Procedure for Displaying bill
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
displayBill PROC ; _______________________________________________
call CLRSCR ; | Calling function to clear previous screen |
; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
mov eax,yellow + (brown * 39) ; | Setting colour of console |
call SetTextColor ; | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
; | |
mov edx , OFFSET mainPrompt ; | Displaying message to user |
call WriteString ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
call CRLF ; |_______________________________________________|
Call CRLF
call CRLF
Call CRLF
mov edx , OFFSET prompBill1
call WriteString
call CRLF
Call CRLF
mov eax, bill
call WriteInt
call CRLF
mov edx , OFFSET prompBill2
call WriteString
call CRLF
Call CRLF
call Input
mov eax, inputMain
sub eax, bill
mov returned, eax
mov edx , OFFSET prompBill3
call WriteString
call CRLF
Call CRLF
mov eax, returned
call WriteInt
call CRLF
mov edx , OFFSET prompBill4
call WriteString
call CRLF
Call CRLF
ret
displayBill ENDP
;....Procedure for Membership Main Menu
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mainMenuMember PROC ; _______________________________________________
mov eax,yellow + (red * 12) ; | Setting colour of console |
call SetTextColor ; | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
; | |
mov edx , OFFSET mainPrompt ; | Displaying message to user |
call WriteString ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
call CRLF ; | |
Call CRLF ; | |
call CRLF ; | |
Call CRLF ; | |
; | |
call CLRSCR ; | Calling function to clear previous screen |
; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
mov edx , OFFSET promptMain1 ; |_______________________________________________|
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptMain2
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptMain3
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptMain4
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptMain5
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptExit
call WriteString
call CRLF
Call CRLF
ret
mainMenuMember ENDP
;....Procedure for Main Menu
; ^^^^^^^^^^^^^^^^^^^^^^^
mainMenu PROC ; _______________________________________________
mov eax,yellow + (red * 12) ; | Setting colour of console |
call SetTextColor ; | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
; | |
call CLRSCR ; | Calling function to clear previous screen |
; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
mov edx , OFFSET mainPrompt ; | Displaying message to user |
call WriteString ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
call CRLF ; |_______________________________________________|
Call CRLF
call CRLF
Call CRLF
mov edx , OFFSET promptMain1
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptMain2
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptMain3
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptMain4
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptMain6
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptMain5
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptExit
call WriteString
call CRLF
Call CRLF
ret
mainMenu ENDP
;....Procedure for Grocery Menu
; ^^^^^^^^^^^^^^^^^^^^^^^^^^
groceryMenu PROC ; _______________________________________________
call CLRSCR ; | Calling function to clear previous screen |
; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
mov eax,yellow + (red * 25) ; | Setting colour of console |
call SetTextColor ; | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
; | |
mov edx , OFFSET mainPrompt ; | Displaying message to user |
call WriteString ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
call CRLF ; |_______________________________________________|
Call CRLF
call CRLF
Call CRLF
mov edx , OFFSET prompGrocery1
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompGrocery2
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompGrocery3
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompGrocery4
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompGrocery5
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptExit
call WriteString
call CRLF
Call CRLF
ret
groceryMenu ENDP
;....Procedure for Stationary Menu
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
stationaryMenu PROC ; _______________________________________________
call CLRSCR ; | Calling function to clear previous screen |
; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
mov eax,yellow + (red * 25) ; | Setting colour of console |
call SetTextColor ; | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
; | |
mov edx , OFFSET mainPrompt ; | Displaying message to user |
call WriteString ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
call CRLF ; |_______________________________________________|
Call CRLF
call CRLF
Call CRLF
mov edx , OFFSET prompStationary1
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompStationary2
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompStationary3
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompStationary4
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompStationary5
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptExit
call WriteString
call CRLF
Call CRLF
ret
stationaryMenu ENDP
;....Procedure for Vegetable Menu
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
vegetableMenu PROC ; _______________________________________________
call CLRSCR ; | Calling function to clear previous screen |
; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
mov eax,yellow + (red * 25) ; | Setting colour of console |
call SetTextColor ; | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
; | |
mov edx , OFFSET mainPrompt ; | Displaying message to user |
call WriteString ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
call CRLF ; |_______________________________________________|
Call CRLF
call CRLF
Call CRLF
mov edx , OFFSET prompVegetable1
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompVegetable2
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompVegetable3
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompVegetable4
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompVegetable5
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptExit
call WriteString
call CRLF
Call CRLF
ret
vegetableMenu ENDP
;....Procedure for Grocery Member Menu
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
groceryMemberMenu PROC ; _______________________________________________
call CLRSCR ; | Calling function to clear previous screen |
; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
mov eax,yellow + (red * 25) ; | Setting colour of console |
call SetTextColor ; | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
; | |
mov edx , OFFSET mainPrompt ; | Displaying message to user |
call WriteString ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
call CRLF ; |_______________________________________________|
Call CRLF
call CRLF
Call CRLF
mov edx , OFFSET prompGroceryMember1
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompGroceryMember2
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompGroceryMember3
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompGroceryMember4
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompGroceryMember5
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptExit
call WriteString
call CRLF
Call CRLF
ret
groceryMemberMenu ENDP
;....Procedure for Stationary Member Menu
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
stationaryMemberMenu PROC ; _______________________________________________
call CLRSCR ; | Calling function to clear previous screen |
; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
mov eax,yellow + (red * 25) ; | Setting colour of console |
call SetTextColor ; | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
; | |
mov edx , OFFSET mainPrompt ; | Displaying message to user |
call WriteString ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
call CRLF ; |_______________________________________________|
Call CRLF
call CRLF
Call CRLF
mov edx , OFFSET prompStationaryMember1
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompStationaryMember2
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompStationaryMember3
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompStationaryMember4
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompStationaryMember5
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptExit
call WriteString
call CRLF
Call CRLF
ret
stationaryMemberMenu ENDP
;....Procedure for Vegetable Member Menu
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
vegetableMemberMenu PROC ; _______________________________________________
call CLRSCR ; | Calling function to clear previous screen |
; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
mov eax,yellow + (red * 25) ; | Setting colour of console |
call SetTextColor ; | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
; | |
mov edx , OFFSET mainPrompt ; | Displaying message to user |
call WriteString ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
call CRLF ; |_______________________________________________|
Call CRLF
call CRLF
Call CRLF
mov edx , OFFSET prompVegetableMember1
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompVegetableMember2
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompVegetableMember3
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompVegetableMember4
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET prompVegetableMember5
call WriteString
call CRLF
Call CRLF
mov edx , OFFSET promptExit
call WriteString
call CRLF
Call CRLF
ret
vegetableMemberMenu ENDP
END main
; ______________
; | :) |
;_______________________________________________________________________________________|End Of Program|___________________________________________________________________________________________________
; |______________|
;