29 CMemCopy0Loop: @^
0 = @^
1 + 0
33 CMemCopy: if ^
2 CMemCopy0Loop
39 CMemSet0Loop: @^
0 = ^
2 + 0
42 CMemSet: if ^
1 CMemSet0Loop
48 ECommonException: push 42
49 ECommonException0Loop: @^
0 = 16 + 0
51 jump ECommonException0Loop
55 ERangeCheckError: writechar
10
78 EoutstrError: writechar
10
97 EDivisionByZeroError: writechar
10
122 call ECommonException
125 BCreateR: edx = eax + 2
132 BBCreate: edx = ^
0 + 2
140 BCreateEmptyR: push eax
145 BCreateEmpty0Loop: @edx = 0 + 0
148 if
ecx BCreateEmpty0Loop
153 BDestroyR: eax = eax - 2
157 BDestroyC: eax = ^
0 - 2
161 BLengthC: eax = ^
0 - 1
174 ifeq
eax ERangeCheckError
185 BResize: call BLengthC
190 if
edx BResize0Bigger
192 BResize0Bigger: top
edx
202 BEnlarge: call BLengthC
210 if
ecx BEnlarge0Bigger
212 BEnlarge0Bigger: call BCreateEmptyR
231 BToIndex: call BOptimize
237 if
ecx ERangeCheckError
241 if
ecx ERangeCheckError
243 BToIndex0Loop: ebx = ebx << 8
254 BBToBlob: eax = 4 + 0
286 ifgeq
eax ERangeCheckError
293 BGetElement: call BToPtr
315 BBSetElement: push ^
1
338 BOptimize: call BLengthC
343 ifeq
@edx BOptimize0RemoveZerosLoop
345 ifeq
edx BOptimize0RemoveOnesLoop
349 BOptimize0RemoveZerosLoop: ifeq
eax BOptimize0End
355 ifeq
@edx BOptimize0RemoveZerosLoop
357 BOptimize0RemoveOnesLoop: ifeq
eax BOptimize0End
361 ifeq
edx BOptimize0End
365 ifeq
edx BOptimize0RemoveOnesLoop
366 BOptimize0End: eax = eax + 1
379 BNot0Loop: @ecx = @edx ^
255
419 BAnd0Loop: @ecx = @esi & @edx
470 BOr0Loop: @ecx = @esi |
@edx
522 BXor0Loop: @ecx = @esi ^
@edx
553 BToShiftLow: call BLengthC
557 ifleq
eax BToShiftLow0End
559 BToShiftLow0End: eax = edx + 0
562 BToShiftHigh: call BLengthC
564 ifl
edx BToShiftHigh0Small
568 if
ecx BToShiftHigh0Overflow
570 jump BToShiftHigh0Check
571 BToShiftHigh0Loop: if
@ecx BToShiftHigh0Overflow
574 BToShiftHigh0Check: if
edx BToShiftHigh0Loop
575 BToShiftHigh0Small: top
ecx
578 jump BToShiftHigh1Check
579 BToShiftHigh1Loop: ecx = ecx + 1
583 BToShiftHigh1Check: eax = eax - 1
584 if
eax BToShiftHigh1Loop
589 BToShiftHigh0Overflow: eax = 2147483647 + 0
598 ifeq
eax BShiftLeft0Positive
610 BShiftLeft0Positive: eax = ^
3 - 1
623 ifeq
edi BShiftLeft0NoExtraNeeded
628 jump BShiftLeft0ExtraDone
629 BShiftLeft0NoExtraNeeded: eax = esi + 0
632 BShiftLeft0ExtraDone: esi = esi - ^
0
635 BShiftLeft0Loop: ecx = @edi << ebx
642 if ^
0 BShiftLeft0Loop
670 ifeq
eax BShiftRight0Positive
684 BShiftRight0Positive: call BLengthC
698 if
eax BShiftRight0NoExtraNeeded
702 BShiftRight0NoExtraNeeded: if ^
1 BShiftRight0NonZero
706 BShiftRight0NonZero: eax = ^
1 + 0
709 BShiftRight0Loop: edx = edx - 1
716 if ^
1 BShiftRight0Loop
717 BShiftRight0End: top
ebx
751 jump BNegate0MiddleOfLoop
752 BNegate0Loop: eax = eax + 1
754 BNegate0MiddleOfLoop: edx = @ebx ^
255
760 if
ecx BNegate0OptimizeEnd
763 if
edx BNegate0OptimizeEnd
770 jump BNegate0OptimizeCommon
771 BNegate0OptimizeEnd: push edi
773 BNegate0OptimizeCommon: esi = eax + 0
800 BSignExtend: call BLengthC
817 BEquals: call BLengthC
822 if
eax BEquals0Return
825 BEquals0Loop: edx = @eax ^
@ecx
826 if
edx BEquals0Return
831 BEquals0Return: eax = 1 + 0
833 ifeq ^
0 BEquals0ReturnTrue
836 BEquals0ReturnTrue: @eax = 255 + 0
856 BBGreater: call BBSubtract
859 if
eax BBGreater0ReturnFalse
862 ifneq
eax BBGreater0ReturnTrue
864 ifeq
@eax BBGreater0ReturnFalse
865 BBGreater0ReturnTrue: call BDestroyC
868 BBGreater0ReturnFalse: call BDestroyC
870 BBGreater0End: eax = 1 + 0
883 BBAdd0Min: ^
0 = ^
0 + 1
899 BBAdd0Loop: ^
0 = ^
0 + @edx
921 BBSubtract: call BLengthC
926 if
ecx BBSubtract0Min
928 BBSubtract0Min: ^
0 = ^
0 + 1
944 BBSubtract0Loop: ^
0 = ^
0 + @edx
953 if ^
4 BBSubtract0Loop
967 BDecimalAdd16R: push ebx
976 BDecimalAdd16R0Loop: edx = @ecx + ebx
981 if
eax BDecimalAdd16R0Loop
982 ifeq
ebx BDecimalAdd16R0End
992 BDecimalAdd16R0End: eax = esi + 0
1001 BDecimalMul16R: push ebx
1010 BDecimalMul16R0Loop: edx = @ecx * 16
1016 if
eax BDecimalMul16R0Loop
1017 ifeq
ebx BDecimalMul16R0End
1020 ifeq
edx BDecimalMul16R0NoMore
1022 BDecimalMul16R0NoMore: push eax
1029 BDecimalMul16R0OneMore: @ecx = ebx % 10
1032 if
ebx BDecimalMul16R0OneMore
1033 BDecimalMul16R0End: eax = esi + 0
1042 BBMultiply: call BLengthC
1067 BBMultiply0OuterLoop: ecx = 0 + 0
1069 BBMultiply0InnerLoop: eax = ^
4 + ^
1
1081 if
eax BBMultiply0InnerLoop
1084 if
eax BBMultiply0OuterLoop
1098 # BBDivMod
(CBlob1
, cBlob2: Blob
): (Blob
, Blob
, Int); blobcall;
1102 ifeq
eax BBDivMod0NoSign0
1105 BBDivMod0NoSign0: push ecx
1108 ifeq
eax BBDivMod0NoSign1
1114 BBDivMod0NoSign1: eax = ^
2 - 1
1117 BBDivMod0Loop: eax = eax - 1
1119 ifneq
@ecx BBDivMod0LoopDone
1120 if
eax BBDivMod0Loop
1121 call EDivisionByZeroError
1122 BBDivMod0LoopDone: push eax
1124 ifeq
eax BBDivMod0NoMoreDivisor
1129 ifeq
eax BBDivMod0NoMoreDivisor
1131 BBDivMod0NoMoreDivisor: eax = ^
3 - 1
1135 BBDivMod1Check: ifneq
@ecx BBDivMod1LoopDone
1138 if
eax BBDivMod1Check
1139 BBDivMod1LoopDone: push eax
1143 ifeq
eax BBDivMod9SameLength
1145 BBDivMod9SameLength: eax = eax + 1
1146 if
eax BBDivMod7Large
1154 BBDivMod7Large: call BCreateEmptyR
1161 BBDivMod2Loop: ^
0 = 0 + 0
1165 BBDivMod3Loop: ifl
ecx BBDivMod3LoopDone
1171 if
edx BBDivMod3Loop
1172 BBDivMod3LoopDone: ^
0 = ^
0 / ^
7
1174 ifeq
ecx BBDivMod6SingleByte
1176 BBDivMod6SingleByte: eax = ^
4 + 0
1179 call BBDivMod0AddMul
1180 BBDivMod2Check: eax = ^
6 - ^
8
1181 if
eax BBDivMod2Loop
1182 ifl
eax BBDivMod4Done
1184 ifleq ^
6 BBDivMod5NoAdd
1188 BBDivMod5NoAdd: ^
0 = eax / ^
7
1189 ifeq ^
0 BBDivMod4Done
1191 call BBDivMod0AddMul
1192 BBDivMod4Done: ^
0 = ^
11 + 0
1204 BBDivMod0AddMul: edx = ^
0 + 0
1205 BBDivMod0AddMul0Loop: edx = edx + @eax
1209 ifneq
edx BBDivMod0AddMul0Loop
1214 BBDivMod0AddMul1Loop: ecx = @^
2 * ^
0
1225 if ^
1 BBDivMod0AddMul1Loop
1226 ifeq
eax BBDivMod0AddMul2Check
1228 jump BBDivMod0AddMul2Check
1229 BBDivMod0AddMul2Loop: ^
6 = ^
6 - 1
1232 BBDivMod0AddMul2Check: ifneq @^
5 BBDivMod0AddMul2SkipLoop
1233 if ^
6 BBDivMod0AddMul2Loop
1234 BBDivMod0AddMul2SkipLoop: return
1236 BBDivide: call BBDivMod
1241 ifeq ^
0 BBDivide0Optimize
1245 BBDivide0Optimize: ^
0 = ^
2 + 0
1247 BBDivide0End: ^
1 = eax + 0
1251 BBModulo: call BBDivMod
1255 ifeq ^
0 BBModulo0Optimize
1259 BBModulo0Optimize: ^
0 = ^
1 + 0
1261 BBModulo0End: ^
1 = eax + 0
1274 if
ebx BIntToStr0Negate
1276 jump BIntToStr0SignDone
1277 BIntToStr0Negate: push edi
1280 BIntToStr0SignDone: eax = esi - 1
1287 BIntToStr0Loop: esi = esi - 1
1295 if
edi BIntToStr0Loop
1302 ifeq
ebx BIntToStr0NoSign
1307 BIntToStr0NoSign: eax = edi - 1
1313 BIntToStr1Loop: edi = edi - 1
1317 if
esi BIntToStr1Loop
1330 BBPrintStr: call BLengthC
1332 BBPrintStr0Loop: writechar
@ecx
1335 if
eax BBPrintStr0Loop
1346 BBgetchr: eax = 1 + 0
1352 BBgetint: readint
eax
1357 BBoutstr: call BLengthC
1359 BBoutstr0Loop: eax = eax - 1
1361 ifneq
edx BBoutstr0WriteChar
1362 ifeq
eax EoutstrError
1366 ifeq
edx BBoutstr0WriteChar
1368 ifeq
edx BBoutstr0Percents
1370 ifeq
edx BBoutstr0Percentd
1372 BBoutstr0Percents: call BBoutstr0GetPar
1374 jump BBoutstr0ClearStack
1375 BBoutstr0Percentd: call BBoutstr0GetPar
1377 BBoutstr0ClearStack: top
ecx
1383 jump BBoutstr0Continue
1384 BBoutstr0WriteChar: writechar
@ecx
1385 BBoutstr0Continue: ecx = ecx + 1
1386 if
eax BBoutstr0Loop
1389 BBoutstr0GetPar: push eax
1395 BFinalizeResult: eax = ebx + 0
1397 ifneq
ecx BFinalizeResult0End
1401 BFinalizeResult0End: push eax
1404 BBIsZero: call BLengthC
1406 ifneq
ecx BBIsZero0Return1
1407 ifneq @^
0 BBIsZero0Return1
1410 BBIsZero0Return1: eax = 1 + 0
1411 BBIsZero0End: push ^
0