; Source File Generated on 10-04-2003 @ hh:mm:ss by BCET_Gen Version 0.04 (Beta) ; (Time left out to make generation compare easier - jlw) ; Later - all the compile & generation options will be listed here Include BcetXc.Inc ; This is Optional! Include Bcet.Inc ; This is REQUIRED! LastShellReturnCode Proto Basic GetMouseFlag Proto Basic :Ptr GetMouse Proto Basic GetKeyFlag Proto Basic :Ptr GetKey Proto Basic GetInput Proto Basic GetInputFlag Proto Basic :Ptr GetLongPP Proto Basic :Dword, :Ptr GetCharP Proto Basic :Dword GetCharPP Proto Basic :Dword, :Dword, :$Str GetStruc Proto Basic :Dword, :Ptr, :Dword ?ModuleStart Dword GETIN_Module Byte 'B', 0, 4, 0 ; version info Dword 0 ; String Pool Size Dword 0 ; Nothing Yet @CurSeg Ends ?StringConst Align 4 Dword 38 String_0001 Byte "GETIN - press control-c to end program", 0 Align 4 Dword 3 String_0002 Byte "K: ", 0 Align 4 Dword 7 String_0003 Byte "0000000", 0 Align 4 Dword 2 String_0004 Byte " ", 0 Align 4 Dword 3 String_0005 Byte "F: ", 0 Align 4 Dword 7 String_0006 Byte "Key: '", 0 Align 4 Dword 1 String_0007 Byte "'", 0 Align 4 Dword 5 String_0008 Byte "Key: ", 0 Align 4 Dword 11 String_0009 Byte "Mouse Click", 0 Align 4 Dword 18 String_0010 Byte "Mouse Double Click", 0 Align 4 Dword 17 String_0011 Byte "Mouse Move Row:", 0 Align 4 Dword 6 String_0012 Byte " Col:", 0 Align 4 Dword 25 String_0013 Byte "This Should never happen!", 0 @CurSeg Ends ?NumberConst Number_0001 Dword 11 ; "11" Number_0002 Dword -1 ; "-1" Number_0003 Dword 8 ; "8" Number_0004 Dword 16777216 ; "&H1000000" Number_0005 Dword 0 ; "0" Number_0006 Dword 32 ; "32" Number_0007 Dword 126 ; "126" Number_0008 Dword 1 ; "1" Number_0009 Dword 2 ; "2" Number_0010 Dword 3 ; "3" Number_0011 Dword 4095 ; "&HFFF" Number_0012 Dword 16773120 ; "&HFFF000" Number_0013 Dword 4096 ; "4096" ; Block: 1: Module: GETIN_Module ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ; Block Init Begin ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ; StmtData 1: DIM Src Line: 37 @CurSeg Ends ?UserVars K_L_v_0_13 Dword 0 ; StmtData 2: DIM Src Line: 37 F_L_v_0_14 Dword 0 ; StmtData 3: DIM Src Line: 37 x_L_v_0_15 Dword 0 ; StmtData 4: DIM Src Line: 37 y_L_v_0_16 Dword 0 ; StmtData 12: vardim Src Line: 46 _StrTmp_00001 $Str 0 ; StmtData 13: vardim Src Line: 46 _StrTmp_00002 $Str 0 ; StmtData 16: vardim Src Line: 49 _Select_00003 Dword 0 ; Block Init End ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ @CurSeg Ends .code GETIN_Module Proc ; Block Variable Init Begin ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ; Block Variable Init End Code ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ; Block Statements Begin ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ; ===> COLOR 11: CLS ; Stmt 5: COLOR Src Line: 39 push 11 ; RT=L, RC=C, Ty=Num, Val="11" push -1 ; RT=L, RC=C, Ty=Num, Val="-1" call js$Color@8 ; ===> COLOR 11: CLS ; Stmt 6: CLS Src Line: 39 call js$Cls@0 ; ===> PRINT "GETIN - press control-c to end program" ; Stmt 7: PRINT Src Line: 40 push Offset String_0001 ; RT=$, RC=C, Ty=Str, Value="GETIN - press control-c to end program" call js$Print$@4 ; ===> PRINT ; Stmt 8: PRINT Src Line: 41 call js$Print@0 ; ===> lh: ; Stmt 9: jlwlabel Src Line: 43 L_lh: ; ; ===> K = GetInputFlag(F) ; Stmt 10: Assignment Src Line: 44 push Offset F_L_v_0_14 ; PA: Parameter 1 GA: 'dVarBvR4 &' RT=L, RC=V, Ty=Sym, Name=F_L_v_0_14 call GetInputFlag ; Usr Fun Call, Name=GetInputFlag mov K_L_v_0_13, eax ; GS: 'dVarBvR4 &' RT=L, RC=V, Ty=Sym, Name=K_L_v_0_13 ; ===> PRINT "K: " + RIGHT$("0000000" + HEX$(K), 8) + " "; ; Stmt 11: PRINT SEMI Src Line: 46 push K_L_v_0_13 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=K_L_v_0_13 Sys Fun Call, Name=RIGHT$ Sys Fun Call, Name=HEX$ call jf$HEX$_L_$@4 mov edi, eax push Offset String_0003 ; RT=$, RC=C, Ty=Str, Value="0000000" push edi call j$StringConcat@8 push eax push 8 ; RT=L, RC=C, Ty=Num, Val="8" call jf$RIGHT$_$L_$@8 mov edi, eax push Offset String_0002 ; RT=$, RC=C, Ty=Str, Value="K: " push edi call j$StringConcat@8 push eax push Offset String_0004 ; RT=$, RC=C, Ty=Str, Value=" " call j$StringConcat@8 push eax call js$PrintSemi$@4 ; ===> PRINT "F: " + RIGHT$("0000000" + HEX$(F), 8) + " "; ; Stmt 14: PRINT SEMI Src Line: 47 push F_L_v_0_14 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=F_L_v_0_14 Sys Fun Call, Name=RIGHT$ Sys Fun Call, Name=HEX$ call jf$HEX$_L_$@4 mov edi, eax push Offset String_0003 ; RT=$, RC=C, Ty=Str, Value="0000000" push edi call j$StringConcat@8 push eax push 8 ; RT=L, RC=C, Ty=Num, Val="8" call jf$RIGHT$_$L_$@8 mov edi, eax push Offset String_0005 ; RT=$, RC=C, Ty=Str, Value="F: " push edi call j$StringConcat@8 push eax push Offset String_0004 ; RT=$, RC=C, Ty=Str, Value=" " call j$StringConcat@8 push eax call js$PrintSemi$@4 ; ===> SELECT CASE K \ &H1000000 ' can't mask here - have to divide ; Stmt 15: select Src Line: 49 push K_L_v_0_13 ; RT=L, RC=V, Ty=Sym, Name=K_L_v_0_13 GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=K_L_v_0_13 push 16777216 ; RT=L, RC=C, Ty=Num, Val="&H1000000" RT=L, RC=C, Ty=Num, Val="&H1000000" call h$IDV32 ; Integer Divide mov _Select_00003, eax ; GS: 'dVarBvR4 &' RT=L, RC=V, Ty=Sym, Name=_Select_00003 ; ===> CASE 0: ' keyboard - only key down events are returned ; Stmt 17: CASE Src Line: 51 cmp _Select_00003, 0 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=_Select_00003 jne SC_01003 ; goto try next case SC_01002: ; Stmt for this case ; ===> IF K >= 32 AND K <= 126 THEN ; Stmt 18: IF Src Line: 55 cmp K_L_v_0_13, 32 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=K_L_v_0_13 mov edi, 0 ; Basic False jl @f dec edi ; Basic True @@: ; cmp K_L_v_0_13, 126 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=K_L_v_0_13 mov esi, 0 ; Basic False jg @f dec esi ; Basic True @@: ; and edi, esi jz IF_01007 ; ===> PRINT "Key: '" + CHR$(K) + "'" ; Stmt 19: PRINT Src Line: 56 push K_L_v_0_13 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=K_L_v_0_13 Sys Fun Call, Name=CHR$ call jf$CHR$_L_$@4 mov edi, eax push Offset String_0006 ; RT=$, RC=C, Ty=Str, Value="Key: '" push edi call j$StringConcat@8 push eax push Offset String_0007 ; RT=$, RC=C, Ty=Str, Value="'" call j$StringConcat@8 push eax call js$Print$@4 ; ===> ELSE ; Stmt 20: ELSE Src Line: 57 jmp IF_01006 ; case else IF_01007: ; ; ===> PRINT "Key: "; K ; Stmt 21: PRINT SEMI Src Line: 58 push Offset String_0008 ; RT=$, RC=C, Ty=Str, Value="Key: " call js$PrintSemi$@4 ; ===> PRINT "Key: "; K ; Stmt 22: PRINT Src Line: 58 push K_L_v_0_13 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=K_L_v_0_13 call js$PrintL@4 ; ===> END IF ; Stmt 23: ENDIF Src Line: 59 IF_01006: ; IF Exit Label IF_01008: ; ; ===> CASE 1: PRINT "Mouse Click" ; Stmt 24: CASE Src Line: 61 jmp SC_01001 ; goto case exit SC_01003: ; for goto from prev case cmp _Select_00003, 1 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=_Select_00003 jne SC_01005 ; goto try next case SC_01004: ; Stmt for this case ; ===> CASE 1: PRINT "Mouse Click" ; Stmt 25: PRINT Src Line: 61 push Offset String_0009 ; RT=$, RC=C, Ty=Str, Value="Mouse Click" call js$Print$@4 ; ===> CASE 2: PRINT "Mouse Double Click" ; Stmt 26: CASE Src Line: 63 jmp SC_01001 ; goto case exit SC_01005: ; for goto from prev case cmp _Select_00003, 2 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=_Select_00003 jne SC_01010 ; goto try next case SC_01009: ; Stmt for this case ; ===> CASE 2: PRINT "Mouse Double Click" ; Stmt 27: PRINT Src Line: 63 push Offset String_0010 ; RT=$, RC=C, Ty=Str, Value="Mouse Double Click" call js$Print$@4 ; ===> CASE 3: ' mouse movement ; Stmt 28: CASE Src Line: 65 jmp SC_01001 ; goto case exit SC_01010: ; for goto from prev case cmp _Select_00003, 3 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=_Select_00003 jne SC_01012 ; goto try next case SC_01011: ; Stmt for this case ; ===> y = K AND &HFFF ; Stmt 29: Assignment Src Line: 66 mov edi, K_L_v_0_13 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=K_L_v_0_13 and edi, 4095 ; RT=L, RC=C, Ty=Num, Val="&HFFF" mov y_L_v_0_16, edi ; GS: 'dVarBvR4 &' RT=L, RC=V, Ty=Sym, Name=y_L_v_0_16 ; ===> x = (K AND &HFFF000) \ 4096 ; Stmt 30: Assignment Src Line: 67 mov edi, K_L_v_0_13 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=K_L_v_0_13 and edi, 16773120 ; RT=L, RC=C, Ty=Num, Val="&HFFF000" push edi push 4096 ; RT=L, RC=C, Ty=Num, Val="4096" RT=L, RC=C, Ty=Num, Val="4096" call h$IDV32 ; Integer Divide mov x_L_v_0_15, eax ; GS: 'dVarBvR4 &' RT=L, RC=V, Ty=Sym, Name=x_L_v_0_15 ; ===> PRINT "Mouse Move Row:"; x; " Col:"; y ; Stmt 31: PRINT SEMI Src Line: 68 push Offset String_0011 ; RT=$, RC=C, Ty=Str, Value="Mouse Move Row:" call js$PrintSemi$@4 ; ===> PRINT "Mouse Move Row:"; x; " Col:"; y ; Stmt 32: PRINT SEMI Src Line: 68 push x_L_v_0_15 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=x_L_v_0_15 call js$PrintSemiL@4 ; ===> PRINT "Mouse Move Row:"; x; " Col:"; y ; Stmt 33: PRINT SEMI Src Line: 68 push Offset String_0012 ; RT=$, RC=C, Ty=Str, Value=" Col:" call js$PrintSemi$@4 ; ===> PRINT "Mouse Move Row:"; x; " Col:"; y ; Stmt 34: PRINT Src Line: 68 push y_L_v_0_16 ; GL: 'dVarBvR4g &' RT=L, RC=V, Ty=Sym, Name=y_L_v_0_16 call js$PrintL@4 ; ===> CASE ELSE: PRINT "This Should never happen!" ; Stmt 35: CASE ELSE Src Line: 70 jmp SC_01001 SC_01012: ; ; ===> CASE ELSE: PRINT "This Should never happen!" ; Stmt 36: PRINT Src Line: 70 push Offset String_0013 ; RT=$, RC=C, Ty=Str, Value="This Should never happen!" call js$Print$@4 ; ===> END SELECT ; Stmt 37: END SELECT Src Line: 71 SC_01001: ; exit label ; ===> GOTO lh ; Stmt 38: GOTO Src Line: 72 jmp L_lh ; Block Statements End ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ; Block Cleanup Begin ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ; StmtDone 12: vardim Src Line: 46 push Offset _StrTmp_00001 ; GL: 'dVarBvR4g $' RT=$, RC=V, Ty=Sym, Name=_StrTmp_00001 call j$StringDelete@4 ; StmtDone 13: vardim Src Line: 46 push Offset _StrTmp_00002 ; GL: 'dVarBvR4g $' RT=$, RC=V, Ty=Sym, Name=_StrTmp_00002 call j$StringDelete@4 ; Block Cleanup End ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ret GETIN_Module EndP ; ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ End ; Gen Code Completed!