flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
m3ntal 01 Dec 2014, 14:29
Quote: I recently got this LG Fathom for ARM programming, used for under $20. It's one of the last Windows Mobile (6.5) phones ever released. ARMv7a CPU with VFP/movw/t. High resolution: 800x480. Good physical keyboard. All standard symbols for pocket programming. Micro SD. Integrated stylus. Long battery life, 2-3 days of light/medium usage. CE/WM is very energy effecient compared to Android and I-Phone. ![]() EXAMPLE: FLAT ASSEMBLER MOBILE (WIP). ONLY 6K .EXE! Download: FASM Mobile ![]() ![]() ![]() FASM Mobile design, minimal text editor. Written in FASMARM, mostly LL assembler with some pseudo instructions (ldi/m=immediate/memory) and function. Source preview: Code: ;;;;;;;;;;;;;;;;;;;;; WINDOW ;;;;;;;;;;;;;;;;;;;;; function initialize call GetModuleHandleW, 0 stm a1, hmodule call HeapCreate, 0, 0, 0 stm a1, heap call GetSystemMetrics, 0 stm a1, os.w stm a1, screen.w stm a1, window.w call GetSystemMetrics, 1 stm a1, os.h stm a1, screen.h sub a1, 22 stm a1, window.h mov a1, 0 stm a1, window.x mov a1, 22 stm a1, window.y endf function create.window ldm a1, hmodule ldi v7, wc str a1, [v7, ?wc.hInstance] mov a1, 0 str a1, [v7, ?wc.style] ldi a1, !window.event str a1, [v7, ?wc.lpfnWndProc] set.window.color 0F7E1E7h ldm v5, window.color call CreateSolidBrush, v5 str a1, [v7, ?wc.hbrBackground] ldi a1, main.class.name str a1, [v7, ?wc.lpszClassName] call RegisterClassW, v7 tst a1, a1 beq .error ldi v1, main.class.name ldi v2, title ldi v3, WS_DEFAULT ldm v4, window.x ldm v5, window.y ldm v6, window.w ldm v7, window.h ldm v8, hmodule call CreateWindowExW, 0, v1, v2, v3,\ v4, v5, v6, v7, 0, 0, v8, 0 stm a1, hwnd tst a1, a1 beq .error .success: return 1 .error: endf 0 function show.window ldm v7, hwnd call ShowWindow, v7, 3 call UpdateWindow, v7 call InvalidateRect, v7, 0, 0 endf ;;;;;;;;;;;;;;;;;;;;; TOOLBAR ;;;;;;;;;;;;;;;;;;;; align IMAGE project.i, open.i, save.i, undo.i,\ cut.i, copy.i, paste.i, search.i,\ compile.i, execute.i, help.i TOOL.BAR tool.bar,\ project.i, open.i, save.i, undo.i,\ search.i, compile.i, execute.i, help.i TOOL.BAR tool.bar2,\ project.i, open.i, save.i, undo.i,\ cut.i, copy.i, paste.i, search.i,\ compile.i, execute.i, help.i filename \ media.folder='MEDIA\',\ project.i.file='MEDIA\CODE.BMP',\ open.i.file='MEDIA\OPEN.BMP',\ save.i.file='MEDIA\SAVE.BMP',\ undo.i.file='MEDIA\UNDO.BMP',\ cut.i.file='MEDIA\CUT.BMP',\ copy.i.file='MEDIA\COPY.BMP',\ paste.i.file='MEDIA\PASTE.BMP',\ search.i.file='MEDIA\SEARCH.BMP',\ compile.i.file='MEDIA\COMPILE.BMP',\ execute.i.file='MEDIA\EXECUTE.BMP',\ help.i.file='MEDIA\HELP.BMP' function load.tool.bar load.images project, open, save,\ undo, cut, copy, paste, search,\ compile, execute, help endf function draw.tool.bar, tb, n alias x=v1, y=v2, w=v3,\ n=v4, p=v5, image=v7 mov x, 0 mov y, 4 mov w, 30 mov p, a1 mov n, a2 @@: ldr image, [p] draw.image image, x, y add x, w add p, 4 subs n, 1 bne @b endf ;;;;;;;;;;;;;;;;;;;;;; IMAGE ;;;;;;;;;;;;;;;;;;;;; function load.image, name, file alias x=v3, bmp=v5, hbmp=v6, image=v7 mov image, a1 add bmp, a1, ?image.bmp add hbmp, a1, ?image.hbmp mov v1, a2 call SHLoadDIBitmap, v1 str a1, [image, ?image.hbmp] mov v1, a1 call GetObjectW, v1, BITMAP.$, bmp ldr x, [bmp, ?bitmap.bmWidth] str x, [image, ?image.w] ldr x, [bmp, ?bitmap.bmHeight] str x, [image, ?image.h] endf macro load.image name, file { if file eq load.image name, name#.file else load.image name, file end if } macro load.images [name] { forward load.image name#.i } function move.image, name, x, y str a2, [a1, ?image.x] str a3, [a1, ?image.y] endf function draw.image, name mov v7, a1 ldm v1, hdc call CreateCompatibleDC, v1 stm a1, mdc mov v1, a1 ldr v2, [v7, ?image.hbmp] call SelectObject, v1, v2 ldm v1, hdc ldr v2, [v7, ?image.x] ldr v3, [v7, ?image.y] ldr v4, [v7, ?image.w] ldr v5, [v7, ?image.h] ldm v6, mdc ldi v7, 0CC0020h call StretchBlt, v1, v2, v3, v4, v5,\ v6, 0, 0, v4, v5, v7 call DeleteDC, v6 endf macro draw.image name, x, y { if ~x eq move.image name, x, y end if draw.image name } Code: function compile, name set.source.file name try preprocessor try parser try assembler try formatter endf 1 function run try compile source.file execute destiny.file endf 1 function preprocessor ; ... endf 1 function parser ; ... endf 1 function assembler ; ... endf 1 function formatter ; ... endf 1 Quote: * Settings > Advanced > Connections > Switch USB MICROSOFT DEVICE EMULATOR You can also use Microsoft Device Emulator and Mobile 6 SDK. Setup: File > Configure > General, set "Shared Folder" to \FASMWM\ and it will appear as "Storage Card" in "File Explorer". If there's an error, "(*) Disable error...". No VFP/movw/t, causes crash. ![]() "ANY GOOD ARM WINDOWS CE DEVICES?" Search DealExtreme for: "GPS WINDOWS CE". The GPS devices have CE 5.0-6.0, 5"-7" screens, bluetooth for mouse/keyboard/remote. You can switch from the launcher to the old Windows CE for ARMv7+ programming in the classic Windows 95-style interface. |
|||
![]() |
|
m3ntal 01 Dec 2014, 17:26
Last edited by m3ntal on 03 Dec 2014, 12:09; edited 1 time in total |
|||
![]() |
|
m3ntal 01 Dec 2014, 17:33
[ Post removed by author. ]
Last edited by m3ntal on 02 Dec 2014, 12:07; edited 1 time in total |
|||
![]() |
|
m3ntal 01 Dec 2014, 18:09
http://msdn.microsoft.com/en-us/library/bb158760.aspx. Windows Mobile GPS MSDN. Gpsapi.lib
|
|||
![]() |
|
m3ntal 02 Dec 2014, 12:06
Update. Improved toolbars for portrait and landscape modes. New "Run/execute" red arrow. "Compile" uses official FASM hammer icon but smaller without microchip. Look at the time
![]() ![]() ![]() |
|||
![]() |
|
dstyl 24 Jul 2015, 17:45
You can also but UNIX os like linux with haret, from sd. Also WM devices have advanced debuging features, and you dont need root ,jailbreak or sth. its completly unprotected. Cool stuff fasm mobile thumbs up
![]() |
|||
![]() |
|
NEASM 14 Sep 2018, 23:59
Download link doesn't works. Please, fix it.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.