Archive for the ‘Conf’ Category

16
dic

Here a unix command line script to count code lines for your project (or something else!).

In this example it counts lines in an Objective-C iOS Application (.h or .m files).

1
2
3
4
$
$find . \( -name '*.h' -o -name '*.m' \) -print -exec cat {} \; | wc -l
  25812
$


Explanation:

find . \( -name ‘*.h’ -o -name ‘*.m’ \) -print

- list all files endings with .H or .M recursively from current folder (.).

-exec cat {} \;

- while it finds files, exec a cat on current file

wc -l

- count lines of current file and sum it to total.

25812 lines of code! Sounds good!

enjoy!

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , ,

26
mag

I prefer to use the Visual Studio 2008 environment to write and test code for the Arduino. The following steps outline what is necessary to accomplish this.

Note that this requires two files to be added that are stub’s for the normal Arduino functions. The stubs provided here use defines for the Arduino Mega and create a simple console application that will map console input/output to the Arduino serial input/output.

For those of you who have more time at hand, it would be nice to write a windows stub which will also allow to see / control the I/O pins.

If you need support for other boards you need to edit the VSPDE.h file.

Also the VSPDE.cpp file does not implement all the Arduino functions, so if you need more, please feel free to update the code.

Main objective for me was to be able to edit and compile, and in a limited way run and debug code using Visual Studio. This will do just that (and nothing more)!

Step 1: Ensure .pde files are seen as C++ files

Open regedit and under \HKEY_CLASSES_ROOT create a new key called “.pde” and change the default value to “cppfile”.

   [HKEY_CLASSES_ROOT\.pde]
   @="cppfile"

Step 2: Configure Visual Studio

  1. Under tools \ options \ Projects and Solutions\VC++ Project settings add ‘*.pde’ to ‘C/C++ File Extensions’ and ‘.pde’ to the ‘Extensions to Include’
  2. Under tools\options\Text Editor\File Extension add PDE and map it to the C++ editor
  3. Close Visual Studio to effect the changes

Step 3: Create a Visual Studio project

  1. Start by creating a new (empty) sketch using the Arduino editor
  2. Next create a Visual C++ ‘Empty Project’ for the sketch in the same folder
  3. In the solution, right click and select Add, Existing item to add the .PDE file(s)
  4. Select the .PDE files, right click and in the file properties set the file type to ‘C/C++ Code’
  5. Add the VSPDE.h and VSPDE.cpp files
  6. Add an #include statement for the VSPDE.h file in the .pde files.
  7. You can now edit, compile and run the program as a console application (without I/O support!)

Step 4: Configure Arduino

Under File\Preferences set the ‘Use external editor’ checkmark.
Now you can use Visual studio to edit and when done just Alt-Tab to the Arduino application and press the upload button to compile the latest code and upload it to the board. The Arduino program will automatically monitor for file changes so you do not need to refresh anything!

Rif: www.arduino.cc




FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , ,

28
gen

Hi all,
a large collection of tricks that you made with registry edit in your Windows Phone 7.
These are all hidden features, but simply editable from the registry directly from phone.

If you don’t have a unlocked phone with registry editor, read this article.
After that, read this one to read / write registry in WP7.
Rif: albertopasca.it

Here we goooooo:

Prevent Relock for ChevronWP7 unlocked device

1
2
3
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]
    "PortalUrlProd"=""
    "PortalUrlInt"=""

OR

1
2
3
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]
"PortalUrlProd"="127.0.0.1"
"PortalUrlInt"="127.0.0.1"

Enable Wifi 11n

1
2
[HKEY_LOCAL_MACHINE\Comm\BCMSDDHD1\Parms]
    "11nModeDisable"=dword:0

Caller ID issue fix

1
2
[HKEY_CURRENT_USER\ControlPanel\Phone]
"CallIDMatch"=dword:7

Live ID Activation Code
(Usefull on HD2 to bypass boring serial number step)

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\GwpCPC]
  "ActivationCode"="R****-H****-I****-*7***-**8**"

Developer Unlock State

1
2
[HKEY_LOCAL_MACHINE\Comm\Security\LVMod]
    "DeveloperUnlockState"=dword:1





Unlock Hidden option in ease of access settings

1
2
3
4
5
[HKEY_LOCAL_MACHINE\System\Accessibility]
    "CompactMode"=dword:0
    "TTY"=dword:1
    "telecoil_UI"=dword:1
    "telecoil"=dword:1

Set AutoData

1
2
3
4
5
[HKEY_LOCAL_MACHINE\System\AutoDataConfig]
"RunADC"=dword:1
"ConfigurationStatus"=dword:0
"Attempt"=dword:0
"MaxAttemptsAllowed"=dword:3

Show 3G Toogle

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\Connectivity\CellularCPL]
 "Show3GToggle"=dword:1

Add “never” option to Lockscreen screen time-out

1
2
[HKEY_LOCAL_MACHINE\ControlPanel\Lock]
"DisableNever"=dword:0

Rif: albertopasca.it

Disable System Logs for best performance (usefull on HD2)

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
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Application]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Security]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\System]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-CellularLogPublisher-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-Dtpt-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-FacebookStatusEvent-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-Mtp-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-SharePoint-Notification-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-ShortMsgEtw-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-SNTransports-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-Commsync-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-SyncStatusEvent-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\EventLog\Channel\Microsoft-WindowsMobile-TelShell-ShellHistoryChannel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-UnifiedStorePublisher-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-RilDrvLogChannel-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-ZTraceChannel]
"DefaultEnable"=dword:00000000

Cleartype settings

1
2
3
4
5
6
[HKEY_LOCAL_MACHINE\System\GDI\ClearTypeSettings\0409]
"ForceOff"=dword:1
"Enabled"=dword:0
"Quality"=dword:0
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\0409]
"ClearTypeText"=dword:1

System & Home Background color to grey (replace dark theme background color)

1
2
3
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1]
    "PageBackgroundColor"="#FF818181"
    "SysTrayBackgroundColor"="#FF818181"


keypad,keyboard background & menu color black (Restart needed to apply)

1
2
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1]
 "ChromeColor" value="#FF000000"

Famous on WM6 glyph cache entry

1
2
[HKEY_LOCAL_MACHINE\SYSTEM\GDI\GLYPHCACHE\0409]
    "limit"=dword:4000

Notification & sound volume

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[HKEY_CURRENT_USER\ControlPanel\Notifications\Vibrate]
"Enabled"=dword:0
[HKEY_CURRENT_USER\ControlPanel\Notifications\Message]
"Enabled"=dword:1
[HKEY_CURRENT_USER\ControlPanel\Notifications\Led]
"Enabled"=dword:1
"TimeOut"=dword:1e
[HKEY_CURRENT_USER\ControlPanel\Notifications\Sounds]
"Enabled"=dword:1
"Repeat"=dword:0
"Wave"="Alarm1"
[HKEY_CURRENT_USER\ControlPanel\Notifications\Default]
"LedRefCount"=dword:0
[HKEY_LOCAL_MACHINE\ControlPanel\Volume]
[HKEY_CURRENT_USER\ControlPanel\Volume]
"Key"=dword:2
"Screen"=dword:2
"Mute"=dword:7
"Volume"=dword:C666C666
"MaxSystemUIVolume"=dword:1E
"MaxInCallUIVolume"=dword:A
"MaxdBAtten"=dword:2D
"MinInCallVolume"=dword:1111

Unlock Hidden option in ease of access settings

1
2
3
4
5
[HKEY_LOCAL_MACHINE\System\Accessibility]
    "CompactMode"=dword:0
    "TTY"=dword:1
    "telecoil_UI"=dword:1
    "telecoil"=dword:1





Change default IE search engine
BING

1
2
3
4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
    "DefaultScope"="Bing"
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\Bing]
"URL"="http://m.bing.com/search/search.aspx?mid=8015&LC=en-us"

GOOGLE

1
2
3
4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
    "DefaultScope"="Google"
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\Google]
"URL"="http://www.google.com/m?hl=en&gl=us&client=ms-hms-tmobile-us&q={searchTerms}"

YAHOO

1
2
3
4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
    "DefaultScope"="Yahoo"
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\Yahoo]
"URL"="http://de.search.yahoo.com/search?p={searchTerms}"

Add url to IE new Tabs

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\AboutURLs]
"tabs"="http://www.albertopasca.it"

Rif: albertopasca.it

ACCENT COLOR NAMES

1
2
3
4
5
6
7
8
9
10
11
12
13
HKEY_LOCAL_MACHINE\ControlPanel\Themes\AccentsDisp layName\0409]
"0"="Green" ;
"1"="Red" ;
"2"="Blue" ;
"3"="Orange" ;
"5"="Pink" ;
"6"="Brown" ;
"7"="Lime" ;
"8"="Teal" ;
"9"="Purple" ;
"10"="Magenta" ;
"11" = "Light blue";
"12" = "Dark blue";


LIGHT

1
2
3
4
5
6
7
8
9
10
11
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\0\Accents]
"0"=dword:FF339933
"1"=dword:FFE51400
"2"=dword:FF1BA1E2
"3"=dword:FFF09609
"5"=dword:FFE671B8
"6"=dword:FFA05000
"7"=dword:FF8CBF26
"8"=dword:FF00ABA9
"9"=dword:FFA200FF
"10"=dword:FFFF0097

DARK

1
2
3
4
5
6
7
8
9
10
11
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1\Accents]
"0"=dword:FF339933
"1"=dword:FFE51400
"2"=dword:FF1BA1E2
"3"=dword:FFF09609
"5"=dword:FFE671B8
"6"=dword:FFA05000
"7"=dword:FF8CBF26
"8"=dword:FF00ABA9
"9"=dword:FFA200FF
"10"=dword:FFFF0097

ADD MORE COLORS

1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\AccentsDisplayName\0409]
"13"="Grey"
"14"="Light grey"
"15"="Black"
"16"="White"
1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\AccentsDisplayName\0c0a]
"13"="Gris"
"14"="Gris claro"
"15"="Negro"
"16"="Blanco"
1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\0\Accents]
"13"=dword:FF808080
"14"=dword:FFC0C0C0
"15"=dword:FF000000
"16"=dword:FFFFFFFF
1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1\Accents]
"13"=dword:FF808080
"14"=dword:FFC0C0C0
"15"=dword:FF000000
"16"=dword:FFFFFFFF


ADD MORE THAN 10 UNSIGNED APPS

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg\Install]
    "MaxUnsignedApp"=dword:7fffffff ; Allow max number of unsignd apps

VARIOUS

1
2
[HKEY_LOCAL_MACHINE\Software\Qualcomm\QosLib]
  "Enabled"=dword:0
1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\Camera\Settings]
  "ScreenOrientation"=dword:0
1
2
[HKEY_LOCAL_MACHINE\Software\Qualcomm\RIL\Options]
  "ExtendedSSInfo"=dword:0
1
2
3
4
5
6
[HKEY_LOCAL_MACHINE\Software\Microsoft\Connectivity\CellularCPL]
  "MakeDataConnectionExclusive"=dword:1
  "Show3GToggle"=dword:1
  "AutoNetwork"=dword:1
  "Roaming"=dword:0
  "CellDataOn"=dword:1
1
2
3
[HKEY_CURRENT_USER\ControlPanel\PhoneNetSelMode]
  "AlwaysShowGSMOperationModes"=dword:1
  "Option"=dword:0
1
2
[HKEY_LOCAL_MACHINE\Software\HTC\Proximity]
  "ProximityDetectStatus"=dword:0

NEVER LOCK SCREEN

1
2
    [HKEY_LOCAL_MACHINE\ControlPanel\Lock]
    "DisableNever"=dword:0

Enjoy as usual and be carefully!!!

Snippet from the web.

Rif: albertopasca.it





FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , , , , , ,

27
gen

Hi all,
you want change bing homepage from Internet Explorer?

IE


Here a simple tricks without unlocking your phone!

The string to edit is here in regedit:

1
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\AboutURLs

and the key is edit is “tabs“.

But… how to change Regedit string in Windows Phone 7 ???
First of all, read this post (how to enable MGF menu).





Next, open MGF, set the password like the previous link and go to:
-> Engineer Menu
-> Other Settings
-> Edit Registry

Select HKEY_LOCAL_MACHINE.
On next textfield type correctly: “Software\Microsoft\Internet Explorer\AboutURLs
Next one write “tabs” – STRING
On the last one, in “Input Data“, type your home page like “http://www.albertopasca.it

Before click SET, please click QUERY to verify that is all correct.
At the bottom you can view registry current key.

If you wrongly type strings, you could damage phone registry and could be necessary an HARD RESET! Be carefully!

Once your setting are ok, click SET and restart your phone!
Now, when you open Internet Explorer without any tabs, you see your custom homepage.

Default tabs value is “res://ieframe.dll/tabswelcome.htm”.

This settings was applied successfully on LG OPTIMUS 7, my phone.

enjoy!

Rif: albertopasca.it





FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , , ,

27
gen

Today a phone code to enable in your apps list a new tool, MFG!


Open telephone and call ##634#.
After that, in your app list you can view MFG.




MFG use a password to enter in secret menù. Type 277634#*# and click ENTER.


Once opened you can set/view/edit a lot of phone functions, like regedit!

1 Device test
2 ELT mode
3 sw Sanity test
4 factory reset
5 version
6 call ui display
7 engineer menu
8 Folder tester
9 IRT test

enjoy and be carefull!!!

Rif: albertopasca.it





FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , ,

28
lug

Hello,
I found a magic trick for windows… it use WMIC.

Using WMIC, it is possible to list out all the running processes and their parameters!

The following command-line outputs the list of running processes (with the complete command-line arguments used for each process) to a text file:

1
WMIC /OUTPUT:C:\ProcessList.txt path win32_process get Caption,Processid,Commandline





Yeah!!!
I was interested to this line in particulary…
I downloaded a tool that convert mp3, avi, etc… in various format (it use ffmpeg background utility), but i want to know the correct parameters used in ffmped to convert avi in IPOD compatible video!
After 1 second I give that magic string!

ffmpeg.exe -y -i “DEC_M6_U1_L3_R.avi” [...] “DEC_M6_U1_L3_R.mp4″

I’m happy!

Rif: albertopasca.it



FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , , , , ,

23
giu

Hello!

if you like linux or mac os, you should also like the windows dragging cool trick right?

In linux you can drag windows anywhere by pressing ALT+CLICK… I’m not sure, but it should be the same thing in OS X.




Googling around… I found an interesting article in howtogeek.com that explains how to do that in Windows OS!!

The original script is here:
http://www.autohotkey.com/docs/scripts/EasyWindowDrag.htm





And this is the howtogeek.com revisited script:

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
Alt & LButton::
CoordMode, Mouse
MouseGetPos, EWD_MouseStartX, EWD_MouseStartY, EWD_MouseWin
WinGetPos, EWD_OriginalPosX, EWD_OriginalPosY,,, ahk_id %EWD_MouseWin%
WinGet, EWD_WinState, MinMax, ahk_id %EWD_MouseWin%
if EWD_WinState = 0
    SetTimer, EWD_WatchMouse, 10
return

EWD_WatchMouse:
GetKeyState, EWD_LButtonState, LButton, P
if EWD_LButtonState = U
{
    SetTimer, EWD_WatchMouse, off
    return
}
GetKeyState, EWD_EscapeState, Escape, P
if EWD_EscapeState = D
{
    SetTimer, EWD_WatchMouse, off
    WinMove, ahk_id %EWD_MouseWin%,, %EWD_OriginalPosX%, %EWD_OriginalPosY%
    return
}
CoordMode, Mouse
MouseGetPos, EWD_MouseX, EWD_MouseY
WinGetPos, EWD_WinX, EWD_WinY,,, ahk_id %EWD_MouseWin%
SetWinDelay, -1
WinMove, ahk_id %EWD_MouseWin%,, EWD_WinX + EWD_MouseX - EWD_MouseStartX, EWD_WinY + EWD_MouseY - EWD_MouseStartY
EWD_MouseStartX := EWD_MouseX
EWD_MouseStartY := EWD_MouseY
return

Oh, you want the complete package?

Ok ok… click here, extract it and put it in Autorun of your Winz.

If you want to write and compile you personalized version, I have coded a C# version, easy to use!

First of all, include Win32API in your code. This library is needed to send events to external windows.

1
2
3
4
5
6
    [DllImport( "user32.dll", CharSet = CharSet.Auto, SetLastError = false )]
    static extern IntPtr SendMessage( int hWnd, uint Msg, int wParam, int lParam );
    [DllImportAttribute( "user32.dll", CharSet = CharSet.Auto, SetLastError = false )]
    public static extern bool ReleaseCapture();
    [DllImport( "user32.dll" )]
    static extern int GetForegroundWindow();

After that, set a timer and call GetForegroundWindow() just like this:

1
     int handle = GetForegroundWindow();

Now, create the KeyHook listener class:

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
  public class KeyPressEventArgs : EventArgs
  {
    public KeyPressEventArgs( Keys ModifierKeys, int KeyCode )
    {
      this.ModifierKeys = ModifierKeys;
      this.KeyCode = KeyCode;
    }
    public readonly Keys ModifierKeys;
    public readonly int KeyCode;
  }

  public class KeyLoggerListener
  {
    public delegate void KeyPressHandler( object inputListener, KeyPressEventArgs KeyPressInfo );
    public event KeyPressHandler OnKeyPress;

    [DllImport( "user32.dll" )]
    public static extern int GetAsyncKeyState( long vKey );

    public void Run()
    {
      Thread t = new Thread( new ThreadStart( Listener ) );
      t.IsBackground = true;
      t.Start();
    }

    private void Listener()
    {
      while ( true )
      {
        Thread.Sleep( 10 );
        int i = 0;
        for ( i = 1; i < Byte.MaxValue; i++ )
        {
          if ( GetAsyncKeyState( i ) == Int16.MinValue + 1 )
          {
            KeyPressEventArgs KeyPressInfo = new KeyPressEventArgs( Control.ModifierKeys, i );
            if ( OnKeyPress != null )
            {
              OnKeyPress( this, KeyPressInfo );
            }
          }
        }
      }
    }
  }

Ok. Now, run it on Form_Load():

1
2
3
      KeyLoggerListener keylogger = new KeyLoggerListener();
      keylogger.OnKeyPress += new KeyLogger.KeyLoggerListener.KeyPressHandler( keylogger_OnKeyPress );
      keylogger.Run();

and create OkKeyPress event:

1
2
3
4
5
6
7
8
9
10
11
12
13
    private void keylogger_OnKeyPress( object inputListener, KeyPressEventArgs KeyPressInfo )
    {
      char digit = Convert.ToChar( KeyPressInfo.KeyCode );
      switch ( KeyPressInfo.ModifierKeys )
      {
        case Keys.Alt:
          ReleaseCapture();
          SendMessage( handle, 0xa1, 0x2, 0 );
          break;
        default:
          break;
      }
    }

It’s all!

When the ALT key is detected, the program will launch a SendMessage( handle, 0xa1, 0×2, 0 ) passing the control (handle) of the foreground window and… you can move it!

Oh, by the way, you can also move an opened Windows’ Start Menu!
You don’t believe me? Watch this!!!

Start menu drag

happy summer.

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , ,

01
giu

E’ sempre bello vedere il proprio blocco note tutto colorato, con dei colori sensati ovviamente…

La volta scora abbiamo parlato di MIXAL e della sua sintassi colorata, e questa volta utilizzando l’assembly della cpu LC2 propongo per voi il syntax highlighting per UltraEdit v15/16++.





Basta andare sul menù:

Avanzate
-> Configurazione
-> Visualizzazione editor
-> Evidenziazione sintassi

ed aggiungerlo! Tutto qui, abbastanza semplice!

Ecco il codice da salvare / aggiungere alla lista:

1
2
3
4
5
6
7
8
9
10
11
12
13
/L20"Assembler LC2" ASMLC2_LANG Line Comment = ; Nocase Escape Char = \ String Chars = "' File Extensions = asm
/Delimiters = ~#!$@%^&*()-+=|\/{}[]:;"'<> , .?
/C1
add and
brz brp brn brnzp brzp blkw
end fill halt jsr jsrr
ld lea ldr ldi orig nop not
ret rti st sti str trap
/C2
# , .
/C3
R0 R1 R2 R3 R4 R5 R6 R7
x21 x23 x25

Da adesso in poi, ogni file .asm che contenga la sintassi dell’LC2 verrà visualizzato correttamente!





Volete fare una prova? Salvate il listato seguente .ASM ed apritelo con UltraEdit!

E’ un semplice programmino che conta i numeri positivi e i negativi da una lista di valori.

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
   .orig x3000
   
conta lea r0, table
   and r2, r2, #0 ;contatore negativi
   and r3, r3, #0 ;contatore positivi
   
ciclo ldr r1, r0, #0 ;ciclo per trovare +/-
   brz fine
   brn isneg
   add r3, r3, #1
   brnzp next
   
isneg add r2, r2, #1
next add r0, r0, #1
   brnzp ciclo
   
fine trap x25

table .fill #100   ;array di elementi
   .fill #1
   .fill #5
   .fill #-6
   .fill #73
   .fill #0
   
   .end

enjoy.

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , ,

16
feb

Per scrivere programmi in MIXAL è possibile utilizzare un qualsiasi editor di testo.

Sarebbe bello e piacevole colorare il codice no?

Ecco per voi la versione .uew per UltraEdit versioni recenti (almeno 15).
Il file va salvato in “AppData\Roaming\IDMComp\UltraEdit\wordfiles” del vostro disco.


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
/L20"MIXAL" MIXAL_LANG Line Comment = * String Chars = " File Extensions = mix
/Colors = 0,8421376,8421376,8421504,255,
/Colors Back = 16777215,16777215,16777215,16777215,16777215,
/Colors Auto Back = 1,1,1,1,1,
/Font Style = 0,0,0,0,0,
/C1 KEYWORDS Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
NOP
ADD FADD
SUB FSUB
MUL FMUL
DIV FDIV
NUM CHAR HLT
SLA SRA SLAX SRAX
SLC SRC
MOVE
LDA LD1 LD2 LD3 LD4 LD5 LD6 LDX
LDAN LD1N LD2N LD3N LD4N LD5N LD6N LDXN
STA ST1 ST2 ST3 ST4 ST5 ST6 STX STJ STZ
JBUS IOC IN OUT JRED
JMP JSJ JOV JNOV JL JE JG JGE JNE JLE
JAN JAZ JAP JANN JANZ JANP
J1N J1Z J1P J1NN J1NZ J1NP
J2N J2Z J2P J2NN J2NZ J2NP
J3N J3Z J3P J3NN J3NZ J3NP
J4N J4Z J4P J4NN J4NZ J4NP
J5N J5Z J5P J5NN J5NZ J5NP
J6N J6Z J6P J6NN J6NZ J6NP
JXN JXZ JXP JXNN JXNZ JXNP
INCA DECA ENTA ENNA
INC1 DEC1 ENT1 ENN1
INC2 DEC2 ENT2 ENN2
INC3 DEC3 ENT3 ENN3
INC4 DEC4 ENT4 ENN4
INC5 DEC5 ENT5 ENN5
INC6 DEC6 ENT6 ENN6
INCX DECX ENTX ENNX
CMPA FCMP CMP1 CMP2 CMP3 CMP4 CMP5 CMP6 CMPX
EQU
CON
ALF
ORIG
END

Per chi usa Crimson Editor invece, può usare questo file di specifica (mixal.spc) e questo per le parole chiave (mixal.key).

Riferimenti: Programmazione degli Elaboratori – Andrea Tettamanzi (UNIMI)

[ref -> albertopasca.it]

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , ,

28
lug

Rieccoci qui per un interessante articolo su come installare e programmare per java mobile su mac osx!

Il famoso compilatore NetBeans (scaricabile qui), purtroppo non ha l’estensione per J2ME per mac os, come si può vedere dall’immagine:

Netbeans

Ma niente è impossibile, vediamo come fare ad installarlo comunque in pochi e semplici passi…

1) Scaricate sul vostro mac due versioni di NetBeans, quella per Mac OS e quella in formato ZIP universale.
2) Scaricate la versione dell’emulatore alternativo a quello di SUN da qui.

3) Installate la versione per mac osx di netbeans.
4) Estraete il contenuto dello zip e andatelo a sovrascrivere con quello installato in “/Applicazioni/NetBeans/NetBeans.app/Contents/Resources/NetBeans/”.

5) Estraete la versione scaricata di mPower Player dove volete.

6) Aprite NetBeans, cliccate su “Strumenti->Java Platform” e poi su “Aggiungi piattaforma”.
7) Selezionate “Java ME MIDP Platform Emulator” e poi la cartella del vostro nuovo emulatore.

8) Create un nuovo progetto… compilate e via!!!


Versioni:
– Netbeans v. 6.7.1 (al momento ultima release aggiornata)
– Mac OS X v. 10.5.7 (al momento ultima release aggiornata)

J2ME anche per Mac OS X!!!

[ref -> albertopasca.it]

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , ,

Switch to our mobile site