-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProject.lst
1254 lines (1148 loc) · 53.1 KB
/
Project.lst
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
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Microsoft (R) Macro Assembler Version 14.29.30133.0 12/05/21 22:14:42
2String Primitives and Macros (Proj6_LANDAL.asm Page 1 - 1
TITLE String Primitives and Macros (Proj6_LANDAL.asm)
; Author: Allison Land
; Last Modified: 12/5/21
; OSU email address: [email protected]
; Course number/section: CS271 Section 400
; Project Number: 6 Due Date: 12/5/21
; Description: This program uses macros to take decimal number inputs as strings, and then converts them to
; decimal numbers and stores them in an array. It then performs calculations and converts the stored
; numbers back into strings, and displays those strings.
;-----------------------------------------------------------------------------------------------------
INCLUDE Irvine32.inc
C ; Include file for Irvine32.lib (Irvine32.inc)
C
C ;OPTION CASEMAP:NONE ; optional: make identifiers case-sensitive
C
C INCLUDE SmallWin.inc ; MS-Windows prototypes, structures, and constants
C .NOLIST
C .LIST
C
C INCLUDE VirtualKeys.inc
C ; VirtualKeys.inc
C .NOLIST
C .LIST
C
C
C .NOLIST
C .LIST
C
; MACRO DEFINITIONS _____________________________________________________________________________
; ---------------------------------------------------------------------------------------------------
; Name: mGetString
;
; Desc: Displays a string.
;
; Preconditions: Called in ReadVal - arguments are pushed onto the stack.
;
; Postconditions: EDX, ECX, EAX changed
;
; Receives: {parameters: StringAddress (reference), bytesReadAddress (reference),
; promptAddress (reference)}
;
; Returns: None
; ---------------------------------------------------------------------------------------------------
mGetString MACRO stringAddress, bytesReadAddress, promptAddress
;prompt user for string input, store using ReadString
MOV EDX, promptAddress
CALL WriteString
MOV EDX, stringAddress
MOV ECX, MAXBYTES
CALL ReadString
MOV [bytesReadAddress], EAX
ENDM
; ---------------------------------------------------------------------------------------------------
; Name: mDisplayString
;
; Desc: Displays string by reversing it (due to reverse storage)
;
; Preconditions: Called in WriteVal - arguments are pushed onto the stack.
;
; Postconditions: EDX, ECX, ESI, EDI, ESI, EAX changed
;
; Receives: {parameters: StringAddress (reference), revStringAddress (reference),
; stringLength (value)}
;
; Returns: None
; ---------------------------------------------------------------------------------------------------
mDisplayString MACRO stringAddress, revStringAddress, stringLength
;print stored string using WriteString
CMP stringLength, 1
JNE _setup
MOV EDX, stringAddress
CALL WriteString
JMP _end
_setup:
CMP stringLength, 0
JE _end
MOV ECX, stringLength
MOV ESI, stringAddress
MOV EDI, revStringAddress
ADD ESI, ECX
DEC ESI
;REVERSE STRING
_reverseLoop:
STD
LODSB
CLD
STOSB
LOOP _reverseLoop
;PRINT STRING
MOV EDX, revStringAddress
CALL WriteString
_end:
ENDM
;-----------------------------------------------------------------------------------------------------
;CONSTANTS
= 7FFFFFFF MAXVAL = 2147483647 ;negated and incremented in code
= 00000039 MAXASCII = 57
= 0000000C MAXBYTES = 12
= 0000000A ARRAYELEMENTS = 10
00000000 .data
00000000 09 09 09 53 74 progTitle BYTE " String Primitives and Macros in MASM Assembly",13,10,0
72 69 6E 67 20
50 72 69 6D 69
74 69 76 65 73
20 61 6E 64 20
4D 61 63 72 6F
73 20 69 6E 20
4D 41 53 4D 20
41 73 73 65 6D
62 6C 79 0D 0A
00
00000033 09 09 09 09 09 programmer BYTE " by Allison Land",13,10,13,10,0
62 79 20 41 6C
6C 69 73 6F 6E
20 4C 61 6E 64
0D 0A 0D 0A 00
0000004C 54 68 69 73 20 instruction BYTE "This program requires that you enter ten integers between -2,147,483,648 and 2,147,483,647.",13,10,13,10,0
70 72 6F 67 72
61 6D 20 72 65
71 75 69 72 65
73 20 74 68 61
74 20 79 6F 75
20 65 6E 74 65
72 20 74 65 6E
20 69 6E 74 65
67 65 72 73 20
62 65 74 77 65
65 6E 20 2D 32
2C 31 34 37 2C
34 38 33 2C 36
34 38 20 61 6E
64 20 32 2C 31
34 37 2C 34 38
33 2C 36 34 37
2E 0D 0A 0D 0A
00
000000AC 50 6C 65 61 73 prompt BYTE "Please enter a number: ",0
65 20 65 6E 74
65 72 20 61 20
6E 75 6D 62 65
72 3A 20 00
000000C4 45 52 52 4F 52 error BYTE "ERROR: This is either not a valid number, or your integer has too many digits.",0
3A 20 54 68 69
73 20 69 73 20
65 69 74 68 65
72 20 6E 6F 74
20 61 20 76 61
6C 69 64 20 6E
75 6D 62 65 72
2C 20 6F 72 20
79 6F 75 72 20
69 6E 74 65 67
65 72 20 68 61
73 20 74 6F 6F
20 6D 61 6E 79
20 64 69 67 69
74 73 2E 00
00000113 2A 2A 45 43 3A ec1 BYTE "**EC: Numbers each line of user input with running total of user's valid numbers using WriteVal.",13,10,13,10,0
20 4E 75 6D 62
65 72 73 20 65
61 63 68 20 6C
69 6E 65 20 6F
66 20 75 73 65
72 20 69 6E 70
75 74 20 77 69
74 68 20 72 75
6E 6E 69 6E 67
20 74 6F 74 61
6C 20 6F 66 20
75 73 65 72 27
73 20 76 61 6C
69 64 20 6E 75
6D 62 65 72 73
20 75 73 69 6E
67 20 57 72 69
74 65 56 61 6C
2E 0D 0A 0D 0A
00
00000178 59 6F 75 20 65 displayList BYTE "You entered the following numbers: ",13,10,0
6E 74 65 72 65
64 20 74 68 65
20 66 6F 6C 6C
6F 77 69 6E 67
20 6E 75 6D 62
65 72 73 3A 20
0D 0A 00
0000019E 54 68 65 69 72 sumString BYTE "Their sum is: ",0
20 73 75 6D 20
69 73 3A 20 00
000001AD 54 68 65 69 72 avgString BYTE "Their rounded average is: ",0
20 72 6F 75 6E
64 65 64 20 61
76 65 72 61 67
65 20 69 73 3A
20 00
000001C8 54 68 61 74 20 farewell BYTE "That was fun - cya later!",0
77 61 73 20 66
75 6E 20 2D 20
63 79 61 20 6C
61 74 65 72 21
00
000001E2 0000000C [ ASCIIstring BYTE MAXBYTES DUP(?)
00
]
000001EE 0000000C [ emptyString BYTE MAXBYTES DUP(?)
00
]
000001FA 0000000C [ revString BYTE MAXBYTES DUP(?)
00
]
00000206 32 31 34 37 34 maxValue BYTE "2147483648",0
38 33 36 34 38
00
00000211 20 00 space BYTE " ",0
00000213 2C 20 00 comma BYTE ", ",0
00000216 0000000A [ numArray SDWORD ARRAYELEMENTS DUP(?)
00000000
]
0000023E 00000001 arrayCount SDWORD 1
00000242 00000000 sum SDWORD ?
00000246 00000000 average SDWORD ?
0000024A 00000000 storedDec SDWORD ?
0000024E 00000000 bytesRead SDWORD ?
00000252 00000000 numCount SDWORD 0
00000256 00000000 boolie SDWORD 0 ; 0 = TRUE 1 = FALSE
;-----------------------------------------------------------------------------------------------------
00000000 .code
00000000 main PROC
;INTRODUCTION
00000000 BA 00000000 R MOV EDX, OFFSET progTitle
00000005 E8 00000000 E CALL WriteString
0000000A BA 00000033 R MOV EDX, OFFSET programmer
0000000F E8 00000000 E CALL Writestring
00000014 BA 00000113 R MOV EDX, OFFSET ec1
00000019 E8 00000000 E CALL WriteString
0000001E BA 0000004C R MOV EDX, OFFSET instruction
00000023 E8 00000000 E CALL WriteString
;GET 10 VALID INTEGERS FROM USER
;set up:
00000028 BF 0000024A R MOV EDI, OFFSET storedDec
0000002D BE 00000216 R MOV ESI, OFFSET numArray
00000032 B9 0000000A MOV ECX, ARRAYELEMENTS
00000037 BB 00000000 MOV EBX, 0
0000003C _loop:
;EXTRA CREDIT 1
0000003C 99 CDQ
0000003D B8 0000000A MOV EAX, 10
00000042 F7 3D 0000023E R IDIV arrayCount
00000048 42 INC EDX
00000049 89 15 0000024E R MOV bytesRead, EDX
0000004F 68 000001FA R PUSH OFFSET revString
00000054 68 0000024E R PUSH OFFSET bytesRead
00000059 68 000001FA R PUSH OFFSET revString
0000005E FF 35 0000023E R PUSH arrayCount
00000064 68 000001E2 R PUSH OFFSET ASCIIstring
00000069 E8 00000322 CALL WriteVal
0000006E BA 00000211 R MOV EDX, OFFSET space
00000073 E8 00000000 E CALL WriteString
00000078 68 00000256 R PUSH OFFSET boolie
0000007D 68 00000206 R PUSH OFFSET maxValue
00000082 68 000000C4 R PUSH OFFSET error
00000087 68 0000024A R PUSH OFFSET storedDec
0000008C 68 000001E2 R PUSH OFFSET ASCIIstring
00000091 68 0000024E R PUSH OFFSET bytesRead
00000096 68 000000AC R PUSH OFFSET prompt
0000009B E8 000001D7 CALL ReadVal
000000A0 E8 00000000 E CALL CrLF
000000A5 83 3D 00000256 R CMP boolie, 1
01
000000AC 75 8E JNE _loop
000000AE FF 05 0000023E R INC arrayCount
000000B4 C7 05 00000256 R MOV boolie, 0
00000000
;STORE IN ARRAY (using register indirect addressing)
000000BE 8B 35 0000024A R MOV ESI, storedDec ; num going into array
000000C4 BF 00000216 R MOV EDI, OFFSET numArray
000000C9 03 FB ADD EDI, EBX
000000CB 89 37 MOV [EDI], ESI ; move value into array
000000CD 83 C3 04 ADD EBX, TYPE numArray
; clear ASCIIstring
000000D0 51 PUSH ECX
000000D1 FC CLD
000000D2 B9 0000000C MOV ECX, MAXBYTES
000000D7 BE 000001EE R MOV ESI, OFFSET emptyString
000000DC BF 000001E2 R MOV EDI, OFFSET ASCIIstring
000000E1 F3/ A4 REP MOVSB
000000E3 59 POP ECX
000000E4 49 DEC ECX
000000E5 83 F9 00 CMP ECX, 0
000000E8 0F 85 FFFFFF4E JNE _loop
;loop through array, display ints
000000EE BA 00000178 R MOV EDX, OFFSET displayList
000000F3 E8 00000000 E CALL WriteString
000000F8 FC CLD
000000F9 8B 0D 0000023E R MOV ECX, arrayCount
000000FF BB 00000000 MOV EBX, 0
00000104 _displayInts:
00000104 BE 00000216 R MOV ESI, OFFSET numarray
00000109 68 000001FA R PUSH OFFSET revString
0000010E 68 0000024E R PUSH OFFSET bytesRead
00000113 68 000001FA R PUSH OFFSET revString
00000118 FF 34 1E PUSH [ESI + EBX]
0000011B 68 000001E2 R PUSH OFFSET ASCIIstring
00000120 E8 0000026B CALL WriteVal
00000125 83 C3 04 ADD EBX, TYPE numArray
00000128 83 F9 02 CMP ECX, 2
0000012B 74 34 JE _break
0000012D BA 00000213 R MOV EDX, OFFSET comma
00000132 E8 00000000 E CALL WriteString
; clear ASCIIstring
00000137 _clear:
00000137 51 PUSH ECX
00000138 FC CLD
00000139 B9 0000000C MOV ECX, MAXBYTES
0000013E BE 000001EE R MOV ESI, OFFSET emptyString
00000143 BF 000001E2 R MOV EDI, OFFSET ASCIIstring
00000148 F3/ A4 REP MOVSB
0000014A 59 POP ECX
; clear revString
0000014B _clear2:
0000014B 51 PUSH ECX
0000014C FC CLD
0000014D B9 0000000C MOV ECX, MAXBYTES
00000152 BE 000001EE R MOV ESI, OFFSET emptyString
00000157 BF 000001FA R MOV EDI, OFFSET revString
0000015C F3/ A4 REP MOVSB
0000015E 59 POP ECX
0000015F E2 A3 LOOP _displayInts
00000161 _break:
; clear ASCIIstring
00000161 51 PUSH ECX
00000162 FC CLD
00000163 B9 0000000C MOV ECX, MAXBYTES
00000168 BE 000001EE R MOV ESI, OFFSET emptyString
0000016D BF 000001E2 R MOV EDI, OFFSET ASCIIstring
00000172 F3/ A4 REP MOVSB
00000174 59 POP ECX
; clear revString
00000175 51 PUSH ECX
00000176 FC CLD
00000177 B9 0000000C MOV ECX, MAXBYTES
0000017C BE 000001EE R MOV ESI, OFFSET emptyString
00000181 BF 000001FA R MOV EDI, OFFSET revString
00000186 F3/ A4 REP MOVSB
00000188 59 POP ECX
;CALCULATE AND DISPLAY SUM
00000189 E8 00000000 E CALL CrLf
0000018E E8 00000000 E CALL CrLF
00000193 BA 0000019E R MOV EDX, OFFSET sumString
00000198 E8 00000000 E CALL WriteString
0000019D 8B 0D 0000023E R MOV ECX, arrayCount
000001A3 83 E9 02 SUB ECX, 2
000001A6 BE 00000216 R MOV ESI, OFFSET numArray
000001AB BF 00000242 R MOV EDI, OFFSET sum
000001B0 BB 00000000 MOV EBX, 0
000001B5 8B 04 1E MOV EAX, [ESI+EBX]
000001B8 _summation:
000001B8 83 C3 04 ADD EBX, 4
000001BB 03 04 1E ADD EAX, [ESI+EBX]
000001BE E2 F8 LOOP _summation
000001C0 89 07 MOV [EDI], EAX
000001C2 68 000001FA R PUSH OFFSET revString
000001C7 68 0000024E R PUSH OFFSET bytesRead
000001CC 68 000001FA R PUSH OFFSET revString
000001D1 FF 37 PUSH [EDI]
000001D3 68 000001E2 R PUSH OFFSET ASCIIstring
000001D8 E8 000001B3 CALL WriteVal
000001DD E8 00000000 E CALL CrLf
000001E2 E8 00000000 E CALL CrLf
; clear ASCIIstring
000001E7 51 PUSH ECX
000001E8 FC CLD
000001E9 B9 0000000C MOV ECX, MAXBYTES
000001EE BE 000001EE R MOV ESI, OFFSET emptyString
000001F3 BF 000001E2 R MOV EDI, OFFSET ASCIIstring
000001F8 F3/ A4 REP MOVSB
000001FA 59 POP ECX
; clear revString
000001FB 51 PUSH ECX
000001FC FC CLD
000001FD B9 0000000C MOV ECX, MAXBYTES
00000202 BE 000001EE R MOV ESI, OFFSET emptyString
00000207 BF 000001FA R MOV EDI, OFFSET revString
0000020C F3/ A4 REP MOVSB
0000020E 59 POP ECX
;CALCULATE AND DISPLAY AVERAGE
0000020F BA 000001AD R MOV EDX, OFFSET avgString
00000214 E8 00000000 E CALL WriteString
00000219 99 CDQ
0000021A A1 00000242 R MOV EAX, sum
0000021F 8B 0D 0000023E R MOV ECX, arrayCount
00000225 83 E9 01 SUB ECX, 1
00000228 F7 F9 IDIV ECX
0000022A A3 00000246 R MOV average, EAX
0000022F 33 C0 XOR EAX, EAX
00000231 33 D2 XOR EDX, EDX
00000233 68 000001FA R PUSH OFFSET revString
00000238 68 0000024E R PUSH OFFSET bytesRead
0000023D 68 000001FA R PUSH OFFSET revString
00000242 FF 35 00000246 R PUSH average
00000248 68 000001E2 R PUSH OFFSET ASCIIstring
0000024D E8 0000013E CALL WriteVal
00000252 E8 00000000 E CALL CrLF
00000257 E8 00000000 E CALL CrLF
0000025C BA 000001C8 R MOV EDX, OFFSET farewell
00000261 E8 00000000 E CALL WriteString
00000266 E8 00000000 E CALL CrLf
0000026B E8 00000000 E CALL CrlF
Invoke ExitProcess,0 ; exit to operating system
00000270 6A 00 * push +000000000h
00000272 E8 00000000 E * call ExitProcess
00000277 main ENDP
; PROCEDURE DEFINITIONS _____________________________________________________________________________
; ---------------------------------------------------------------------------------------------------
; Name: ReadVal
;
; Desc: Gets a string from the user and validates that it contains a valid integer that will
; fit in a 32 bit register (11 characters total, including sign +/-)
;
; Preconditions: PUSHED TO STACK: OFFSET boolie, OFFSET maxValue, OFFSET error, OFFSET storedDec
; OFFSET ASCIIstring, OFFSET bytesRead, OFFSET prompt
;
; Postconditions: Registers preserved on stack and not changed.
;
; Receives: {parameters: OFFSET error, OFFSET storedDec, OFFSET ASCIIstring, OFFSET bytesRead, OFFSET prompt}
;
; Returns: None
; ---------------------------------------------------------------------------------------------------
00000277 readVal PROC USES ECX EDX ESI EDI
;invoke mGetString
00000277 51 * push ecx
00000278 52 * push edx
00000279 56 * push esi
0000027A 57 * push edi
0000027B 55 PUSH EBP
0000027C 8B EC MOV EBP, ESP
mGetString [EBP + 32], [EBP + 28], [EBP + 24] ;stringAddress, bytesReadAddress, promptAddress
0000027E 8B 55 18 1 MOV EDX, [EBP + 24]
00000281 E8 00000000 E 1 CALL WriteString
00000286 8B 55 20 1 MOV EDX, [EBP + 32]
00000289 B9 0000000C 1 MOV ECX, MAXBYTES
0000028E E8 00000000 E 1 CALL ReadString
00000293 89 45 1C 1 MOV [[EBP + 28]], EAX
; string primitive setup
00000296 _setup:
00000296 FC CLD
00000297 8B 55 1C MOV EDX, [EBP + 28]
0000029A 8B CA MOV ECX, EDX ; bytesread
0000029C 8B 75 20 MOV ESI, [EBP + 32] ; input array ASCIIstring (from mGetString)
0000029F BF 00000000 MOV EDI, 0 ; for conversion algorithim
000002A4 8B 55 2C MOV EDX, [EBP + 44] ; track iteration through maxvalue chars
;CHECK FOR SIGNS
000002A7 _stringLoop:
000002A7 33 C0 XOR EAX, EAX
000002A9 AC LODSB
000002AA 3C 2D CMP AL, 45 ; -
000002AC 0F 84 00000089 JE _skipSign
000002B2 3C 2B CMP AL, 43 ; +
000002B4 0F 84 00000081 JE _skipSign
000002BA 3B 4D 1C CMP ECX, [EBP + 28]
000002BD 75 28 JNE _numsOnly
;VALIDATE LENGTH FIRST ITERATION
000002BF 83 F9 0A CMP ECX, LENGTHOF MAXVALUE-1 ; if more chars than maxvalue (no sign)
000002C2 7F 79 JG _error
000002C4 83 F9 0A CMP ECX, LENGTHOF MAXVALUE-1
000002C7 74 0F JE _validateLoop1
000002C9 EB 1C JMP _numsOnly
000002CB _signLength:
000002CB 83 F9 0B CMP ECX, LENGTHOF MAXVALUE
000002CE 7F 6D JG _error
000002D0 83 F9 0B CMP ECX, LENGTHOF MAXVALUE
000002D3 7C 12 JL _numsOnly
000002D5 _validateLoop2: ; if same length as max value, check if value is greater than maxvalue
000002D5 33 C0 XOR EAX, EAX
000002D7 AC LODSB
000002D8 _validateLoop1:
000002D8 8B 55 1C MOV EDX, [EBP+28] ;bytes read/ counter
000002DB 2B D1 SUB EDX, ECX
000002DD 3A 82 00000206 R CMP AL, maxValue[EDX]
000002E3 7F 58 JG _error
000002E5 E2 EE LOOP _validateLoop2
000002E7 _numsOnly:
000002E7 FC CLD ; check for invalid chars
000002E8 8B 55 1C MOV EDX, [EBP + 28]
000002EB 8B CA MOV ECX, EDX
000002ED 8B 75 20 MOV ESI, [EBP + 32] ; input array ASCIIstring (from mGetString)
000002F0 33 C0 XOR EAX, EAX
000002F2 AC LODSB
000002F3 3C 2D CMP AL, 45 ; -
000002F5 74 0C JE _loopNumsOnly
000002F7 3C 2B CMP AL, 43 ; +
000002F9 74 08 JE _loopNumsOnly
000002FB _checknum:
000002FB 3C 30 CMP AL, 48
000002FD 7C 3E JL _error
000002FF 3C 39 CMP AL, 57
00000301 7F 3A JG _error
00000303 _loopNumsOnly:
00000303 33 C0 XOR EAX, EAX
00000305 AC LODSB
00000306 E2 F3 LOOP _checkNum
00000308 _convert2: ;setup conversion
00000308 FC CLD
00000309 8B 55 1C MOV EDX, [EBP + 28]
0000030C 8B CA MOV ECX, EDX ; bytesread
0000030E 8B 75 20 MOV ESI, [EBP + 32] ; input array ASCIIstring (from mGetString)
00000311 BF 00000000 MOV EDI, 0 ; for conversion algorithim
00000316 _convert:
00000316 33 C0 XOR EAX, EAX
00000318 AC LODSB
00000319 3C 2D CMP AL, 45
0000031B 74 15 JE _convertLoop
0000031D 3C 2B CMP AL, 43
0000031F 74 11 JE _convertLoop
00000321 83 E8 30 SUB EAX, 48 ;convert ASCII to SDWORD
00000324 6B FF 0A IMUL EDI, 10
00000327 03 C7 ADD EAX, EDI
00000329 8B F8 MOV EDI, EAX
0000032B 83 FF 00 CMP EDI, 0
0000032E 7D 02 JGE _convertLoop
00000330 F7 DF NEG EDI
00000332 _convertLoop:
00000332 E2 E2 LOOP _convert
00000334 8B 45 24 MOV EAX, [EBP+36]
00000337 89 38 MOV [EAX], EDI
00000339 EB 0C JMP _validateNeg
0000033B _skipSign:
0000033B EB 8E JMP _signLength ; jump
0000033D _error:
0000033D 8B 55 28 MOV EDX, [EBP + 40]
00000340 E8 00000000 E CALL WriteString
00000345 EB 43 JMP _errorExit
; NEGATE IF NEGATIVE
00000347 _validateNeg:
00000347 B9 00000001 MOV ECX, 1
0000034C 8B 75 20 MOV ESI, [EBP + 32] ;input array ASCIIstring (from mGetString)
0000034F AC LODSB
00000350 3C 2D CMP AL, 45 ;check if first char is -
00000352 75 0F JNE _exit
00000354 F7 DF NEG EDI
00000356 8B 45 24 MOV EAX, [EBP+36]
00000359 81 FF 80000000 CMP EDI, -MAXVAL-1
0000035F 7C DC JL _error
00000361 89 38 MOV [EAX], EDI
00000363 _exit:
00000363 B9 00000001 MOV ECX, 1
00000368 8B 75 20 MOV ESI, [EBP + 32] ;input array ASCIIstring (from mGetString)
0000036B AC LODSB
0000036C 3C 2D CMP AL, 45
0000036E 75 08 JNE _exit2
00000370 81 FF 7FFFFFFF CMP EDI, MAXVAL
00000376 7F C5 JG _error
00000378 _exit2:
00000378 33 C9 XOR ECX, ECX
0000037A 8B 55 30 MOV EDX, [EBP + 48]
0000037D B9 00000001 MOV ECX, 1
00000382 89 0A MOV [EDX], ECX ; boolie return TRUE (1)
00000384 89 7D 24 MOV [EBP + 36], EDI ; output storedDec
00000387 89 55 2A MOV [EBP + 42], EDX
0000038A _errorExit:
0000038A 5D POP EBP
RET
0000038B 5F * pop edi
0000038C 5E * pop esi
0000038D 5A * pop edx
0000038E 59 * pop ecx
0000038F C3 * ret 00000h
00000390 ReadVal ENDP
; ---------------------------------------------------------------------------------------------------
; Name: WriteVal
;
; Desc: Converts a SDWORD to ASCII and displays the number value as a string.
;
; Preconditions: PUSHED TO STACK: OFFSET revString, OFFSET bytesRead, OFFSET revString
; value to display, OFFSET ASCIIstring
;
; Postconditions: Registers preserved on stack and not changed.
;
;
; Receives: {parameters: revString (reference), bytesRead (reference), revString (reference)
; value to display (value), ASCIIstring (reference)}
;
; Returns: None
; ---------------------------------------------------------------------------------------------------
00000390 WriteVal PROC USES EAX EDX EBX ECX
00000390 50 * push eax
00000391 52 * push edx
00000392 53 * push ebx
00000393 51 * push ecx
00000394 55 PUSH EBP
00000395 8B EC MOV EBP, ESP
00000397 BB 00000000 MOV EBX, 0 ;initialize digit count
0000039C 33 D2 XOR EDX, EDX
0000039E 8B 45 1C MOV EAX, [EBP + 28] ;move value into EAX
000003A1 83 F8 00 CMP EAX, 0
000003A4 7D 02 JGE _loop
000003A6 F7 D8 NEG EAX
000003A8 _loop:
000003A8 99 CDQ
000003A9 B9 0000000A MOV ECX, 10
000003AE F7 F9 IDIV ECX
000003B0 B9 00000000 MOV ECX, 0
000003B5 8B FA MOV EDI, EDX
000003B7 83 C7 30 ADD EDI, 48 ;else add 48 to remainder to convert to ASCII
000003BA 8B 4D 18 MOV ECX, [EBP + 24] ;move into ASCIIstring
000003BD 03 CB ADD ECX, EBX
000003BF 89 39 MOV [ECX], EDI
000003C1 43 INC EBX
000003C2 83 F8 00 CMP EAX, 0 ;if quotient is 0, then last digit
000003C5 7E 02 JLE _isNegative
000003C7 EB DF JMP _loop
000003C9 _isNegative:
000003C9 8B 55 1C MOV EDX, [EBP + 28]
000003CC 83 FA 00 CMP EDX, 0
000003CF 7D 0F JGE _displaystring
000003D1 _negSign:
000003D1 8B 4D 18 MOV ECX, [EBP + 24]
000003D4 03 CB ADD ECX, EBX
000003D6 33 D2 XOR EDX, EDX
000003D8 BA 0000002D MOV EDX, 45
000003DD 89 11 MOV [ECX], EDX ;move into ASCIIstring
000003DF 43 INC EBX
000003E0 _displayString:
000003E0 8B 7D 24 MOV EDI, [EBP + 36]
000003E3 89 1F MOV [EDI], EBX
000003E5 33 C9 XOR ECX, ECX
000003E7 8B CB MOV ECX, EBX
mDisplayString [EBP + 24], [EBP + 40], ECX ;stringAddress, revStringAddress, stringLength
000003E9 83 F9 01 1 CMP ECX, 1
000003EC 75 0A 1 JNE _setup
000003EE 8B 55 18 1 MOV EDX, [EBP + 24]
000003F1 E8 00000000 E 1 CALL WriteString
000003F6 EB 1E 1 JMP _end
000003F8 1 _setup:
000003F8 83 F9 00 1 CMP ECX, 0
000003FB 74 19 1 JE _end
000003FD 8B C9 1 MOV ECX, ECX
000003FF 8B 75 18 1 MOV ESI, [EBP + 24]
00000402 8B 7D 28 1 MOV EDI, [EBP + 40]
00000405 03 F1 1 ADD ESI, ECX
00000407 4E 1 DEC ESI
00000408 1 _reverseLoop:
00000408 FD 1 STD
00000409 AC 1 LODSB
0000040A FC 1 CLD
0000040B AA 1 STOSB
0000040C E2 FA 1 LOOP _reverseLoop
0000040E 8B 55 28 1 MOV EDX, [EBP + 40]
00000411 E8 00000000 E 1 CALL WriteString
00000416 1 _end:
00000416 5D POP EBP
RET
00000417 59 * pop ecx
00000418 5B * pop ebx
00000419 5A * pop edx
0000041A 58 * pop eax
0000041B C3 * ret 00000h
0000041C WriteVal ENDP
END main
Microsoft (R) Macro Assembler Version 14.29.30133.0 12/05/21 22:14:42
2String Primitives and Macros (Proj6_LANDAL.asm Symbols 2 - 1
Macros:
N a m e Type
mDisplayString . . . . . . . . . Proc
mGetString . . . . . . . . . . . Proc
Structures and Unions:
N a m e Size
Offset Type
CONSOLE_CURSOR_INFO . . . . . . 00000008
dwSize . . . . . . . . . . . . 00000000 DWord
bVisible . . . . . . . . . . . 00000004 DWord
CONSOLE_SCREEN_BUFFER_INFO . . . 00000016
dwSize . . . . . . . . . . . . 00000000 DWord
dwCursorPosition . . . . . . . 00000004 DWord
wAttributes . . . . . . . . . 00000008 Word
srWindow . . . . . . . . . . . 0000000A QWord
dwMaximumWindowSize . . . . . 00000012 DWord
COORD . . . . . . . . . . . . . 00000004
X . . . . . . . . . . . . . . 00000000 Word
Y . . . . . . . . . . . . . . 00000002 Word
FILETIME . . . . . . . . . . . . 00000008
loDateTime . . . . . . . . . . 00000000 DWord
hiDateTime . . . . . . . . . . 00000004 DWord
FOCUS_EVENT_RECORD . . . . . . . 00000004
bSetFocus . . . . . . . . . . 00000000 DWord
FPU_ENVIRON . . . . . . . . . . 0000001C
controlWord . . . . . . . . . 00000000 Word
statusWord . . . . . . . . . . 00000004 Word
tagWord . . . . . . . . . . . 00000008 Word
instrPointerOffset . . . . . . 0000000C DWord
instrPointerSelector . . . . . 00000010 DWord
operandPointerOffset . . . . . 00000014 DWord
operandPointerSelector . . . . 00000018 Word
INPUT_RECORD . . . . . . . . . . 00000014
EventType . . . . . . . . . . 00000000 Word
Event . . . . . . . . . . . . 00000004 XmmWord
bKeyDown . . . . . . . . . . . 00000000 DWord
wRepeatCount . . . . . . . . . 00000004 Word
wVirtualKeyCode . . . . . . . 00000006 Word
wVirtualScanCode . . . . . . . 00000008 Word
uChar . . . . . . . . . . . . 0000000A Word
UnicodeChar . . . . . . . . . 00000000 Word
AsciiChar . . . . . . . . . . 00000000 Byte
dwControlKeyState . . . . . . 0000000C DWord
dwMousePosition . . . . . . . 00000000 DWord
dwButtonState . . . . . . . . 00000004 DWord
dwMouseControlKeyState . . . . 00000008 DWord
dwEventFlags . . . . . . . . . 0000000C DWord
dwSize . . . . . . . . . . . . 00000000 DWord
dwCommandId . . . . . . . . . 00000000 DWord
bSetFocus . . . . . . . . . . 00000000 DWord
KEY_EVENT_RECORD . . . . . . . . 00000010
bKeyDown . . . . . . . . . . . 00000000 DWord
wRepeatCount . . . . . . . . . 00000004 Word
wVirtualKeyCode . . . . . . . 00000006 Word
wVirtualScanCode . . . . . . . 00000008 Word
uChar . . . . . . . . . . . . 0000000A Word
UnicodeChar . . . . . . . . . 00000000 Word
AsciiChar . . . . . . . . . . 00000000 Byte
dwControlKeyState . . . . . . 0000000C DWord
MENU_EVENT_RECORD . . . . . . . 00000004
dwCommandId . . . . . . . . . 00000000 DWord
MOUSE_EVENT_RECORD . . . . . . . 00000010
dwMousePosition . . . . . . . 00000000 DWord
dwButtonState . . . . . . . . 00000004 DWord
dwMouseControlKeyState . . . . 00000008 DWord
dwEventFlags . . . . . . . . . 0000000C DWord
SMALL_RECT . . . . . . . . . . . 00000008
Left . . . . . . . . . . . . . 00000000 Word
Top . . . . . . . . . . . . . 00000002 Word
Right . . . . . . . . . . . . 00000004 Word
Bottom . . . . . . . . . . . . 00000006 Word
SYSTEMTIME . . . . . . . . . . . 00000010
wYear . . . . . . . . . . . . 00000000 Word
wMonth . . . . . . . . . . . . 00000002 Word
wDayOfWeek . . . . . . . . . . 00000004 Word
wDay . . . . . . . . . . . . . 00000006 Word
wHour . . . . . . . . . . . . 00000008 Word
wMinute . . . . . . . . . . . 0000000A Word
wSecond . . . . . . . . . . . 0000000C Word
wMilliseconds . . . . . . . . 0000000E Word
WINDOW_BUFFER_SIZE_RECORD . . . 00000004
dwSize . . . . . . . . . . . . 00000000 DWord
Segments and Groups:
N a m e Size Length Align Combine Class
FLAT . . . . . . . . . . . . . . GROUP
STACK . . . . . . . . . . . . . 32 Bit 00001000 Para Stack 'STACK'
_DATA . . . . . . . . . . . . . 32 Bit 0000025A Para Public 'DATA'
_TEXT . . . . . . . . . . . . . 32 Bit 0000041C Para Public 'CODE'
Procedures, parameters, and locals:
N a m e Type Value Attr
CloseFile . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
CloseHandle . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Clrscr . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
CreateFileA . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
CreateOutputFile . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Crlf . . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Delay . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
DumpMem . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
DumpRegs . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ExitProcess . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
FileTimeToDosDateTime . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
FileTimeToSystemTime . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
FlushConsoleInputBuffer . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
FormatMessageA . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetCommandLineA . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetCommandTail . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetConsoleCP . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetConsoleCursorInfo . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetConsoleMode . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetConsoleScreenBufferInfo . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetDateTime . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetFileTime . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetKeyState . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetLastError . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetLocalTime . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetMaxXY . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetMseconds . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetNumberOfConsoleInputEvents . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetProcessHeap . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetStdHandle . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetSystemTime . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetTextColor . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
GetTickCount . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Gotoxy . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
HeapAlloc . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
HeapCreate . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
HeapDestroy . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
HeapFree . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
HeapSize . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
IsDigit . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
LocalFree . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
MessageBoxA . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
MsgBoxAsk . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
MsgBox . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
OpenInputFile . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ParseDecimal32 . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ParseInteger32 . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
PeekConsoleInputA . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Random32 . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
RandomRange . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Randomize . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadChar . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadConsoleA . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadConsoleInputA . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadDec . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadFile . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadFloat . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadFromFile . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadHex . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadInt . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadKeyFlush . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadKey . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ReadString . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleCursorInfo . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleCursorPosition . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleMode . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleScreenBufferSize . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleTextAttribute . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleTitleA . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetConsoleWindowInfo . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetFilePointer . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetLocalTime . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SetTextColor . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
ShowFPUStack . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Sleep . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
StrLength . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Str_compare . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Str_copy . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Str_length . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Str_trim . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
Str_ucase . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
SystemTimeToFileTime . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WaitMsg . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteBinB . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteBin . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteChar . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteConsoleA . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteConsoleOutputAttribute . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteConsoleOutputCharacterA . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteDec . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteFile . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteFloat . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteHexB . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteHex . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteInt . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteStackFrameName . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteStackFrame . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteString . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteToFile . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
WriteVal . . . . . . . . . . . . P Near 00000390 _TEXT Length= 0000008C Public STDCALL
_loop . . . . . . . . . . . . L Near 000003A8 _TEXT
_isNegative . . . . . . . . . L Near 000003C9 _TEXT
_negSign . . . . . . . . . . . L Near 000003D1 _TEXT
_displayString . . . . . . . . L Near 000003E0 _TEXT
_setup . . . . . . . . . . . . L Near 000003F8 _TEXT
_reverseLoop . . . . . . . . . L Near 00000408 _TEXT
_end . . . . . . . . . . . . . L Near 00000416 _TEXT
WriteWindowsMsg . . . . . . . . P Near 00000000 FLAT Length= 00000000 External STDCALL
main . . . . . . . . . . . . . . P Near 00000000 _TEXT Length= 00000277 Public STDCALL
_loop . . . . . . . . . . . . L Near 0000003C _TEXT
_displayInts . . . . . . . . . L Near 00000104 _TEXT
_clear . . . . . . . . . . . . L Near 00000137 _TEXT
_clear2 . . . . . . . . . . . L Near 0000014B _TEXT
_break . . . . . . . . . . . . L Near 00000161 _TEXT
_summation . . . . . . . . . . L Near 000001B8 _TEXT
printf . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External C
readVal . . . . . . . . . . . . P Near 00000277 _TEXT Length= 00000119 Public STDCALL
_setup . . . . . . . . . . . . L Near 00000296 _TEXT
_stringLoop . . . . . . . . . L Near 000002A7 _TEXT
_signLength . . . . . . . . . L Near 000002CB _TEXT
_validateLoop2 . . . . . . . . L Near 000002D5 _TEXT
_validateLoop1 . . . . . . . . L Near 000002D8 _TEXT
_numsOnly . . . . . . . . . . L Near 000002E7 _TEXT
_checknum . . . . . . . . . . L Near 000002FB _TEXT
_loopNumsOnly . . . . . . . . L Near 00000303 _TEXT
_convert2 . . . . . . . . . . L Near 00000308 _TEXT
_convert . . . . . . . . . . . L Near 00000316 _TEXT
_convertLoop . . . . . . . . . L Near 00000332 _TEXT
_skipSign . . . . . . . . . . L Near 0000033B _TEXT
_error . . . . . . . . . . . . L Near 0000033D _TEXT
_validateNeg . . . . . . . . . L Near 00000347 _TEXT
_exit . . . . . . . . . . . . L Near 00000363 _TEXT
_exit2 . . . . . . . . . . . . L Near 00000378 _TEXT
_errorExit . . . . . . . . . . L Near 0000038A _TEXT
scanf . . . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External C
wsprintfA . . . . . . . . . . . P Near 00000000 FLAT Length= 00000000 External C
Symbols:
N a m e Type Value Attr
@CodeSize . . . . . . . . . . . Number 00000000h
@DataSize . . . . . . . . . . . Number 00000000h
@Interface . . . . . . . . . . . Number 00000003h
@Model . . . . . . . . . . . . . Number 00000007h