Author Topic: Uncle Remus Tales  (Read 1657 times)

HSE

  • Member
  • ****
  • Posts: 519
  • <AMD>< 7-32>
Re: Uncle Remus Tales
« Reply #60 on: July 16, 2017, 11:09:57 AM »
The robot only like 64bit. ¿? 

Number is similar to your other files, perhaps somebody is teaching with your files.

Mikl__

  • Member
  • ****
  • Posts: 519
Re: Uncle Remus Tales
« Reply #61 on: July 16, 2017, 12:22:50 PM »
Quote
perhaps somebody is teaching with your files
Hi, HSE!
It seems that this is a school class. I think that one person would download the file once or twice. Worse, that with the one who downloads there is no feedback.
Quote
14.zip (7.1 kB - downloaded 258 times.)
It is only robot

jj2007

  • Member
  • *****
  • Posts: 7319
  • Assembler is fun ;-)
    • MasmBasic
Re: Uncle Remus Tales
« Reply #62 on: July 16, 2017, 05:05:30 PM »
Or a really big school class ;)

Mikl__

  • Member
  • ****
  • Posts: 519
Re: Uncle Remus Tales
« Reply #63 on: August 03, 2017, 02:41:10 PM »
Sticky drawing
rc-file
Code: [Select]
MYBP1 BITMAP tar_baby.bmpasm-file
Code: [Select]
; GUI #
include win64a.inc
.code
WinMain proc
local msg:MSG
 
    xor ebx,ebx
    mov esi,IMAGE_BASE
    mov ecx,offset FileName
invoke LoadCursorFromFile
    mov edi,offset ClassName
 
    push rax    ;hIconSm
    push rdi    ;lpszClassName
    push rbx    ;lpszMenuName
    push COLOR_WINDOW+1;hbrBackground
    push 10003h ;hCursor
    push rax    ;hIcon
    push rsi    ;hInstance
    push rbx    ;cbClsExtra & cbWndExtra
    pushaddr WndProc      ;lpfnWndProc
    push sizeof WNDCLASSEX;cbSize & style
    invoke RegisterClassEx,esp    ;addr WNDCLASSEX 

    push rbx
    push rsi    ;rsi=400000h
    shl esi,9   ;rsi=CW_USEDEFAULT
    push rbx
    push rbx
    push rsi
    push rsi
    push rsi
    push rsi
    sub esp,20h
    invoke CreateWindowEx,0,edi,edi,WS_OVERLAPPEDWINDOW or WS_VISIBLE

    lea edi,msg
@@: invoke GetMessage,edi,0,0,0
    invoke DispatchMessage,edi
    jmp @b
WinMain endp
WndProc proc hwnd:QWORD,uMsg:QWORD,wParam:QWORD,lParam:QWORD
mov hwnd,rcx   

cmp edx,WM_CREATE
je wmCREATE
cmp edx,WM_DESTROY
je wmDESTROY
cmp edx,WM_PAINT
je wmPAINT
cmp dx,WM_MOUSEMOVE
je wmMOUSEMOVE
leave
jmp NtdllDefWindowProc_
 
wmDESTROY:invoke ReleaseDC,hwnd,DC
invoke DeleteDC,memDC
invoke DeleteObject,hBit1
invoke RtlExitUserProcess,NULL
wmCREATE:mov edx,offset aMYBP
invoke LoadBitmap,IMAGE_BASE
mov hBit1,rax
        invoke GetDC,hwnd
mov DC,rax
invoke CreateCompatibleDC,eax;DC
        mov memDC,rax
invoke SelectObject,eax,hBit1
jmp  wmBYE
wmMOUSEMOVE:;low order lParam  = x    high order lParam = y
mov word ptr expHPoint.x,r9w
shr r9,16
mov expHPoint.y,r9d
mov r8b,TRUE
invoke InvalidateRect,,0;,TRUE
jmp  wmBYE
wmPAINT:mov r8d,expHPoint.y
sub r8d,50
    mov edx,expHPoint.x
sub edx,50
    invoke BitBlt,DC,,,164,206,memDC,rbx,rbx,SRCCOPY
wmBYE: leave
retn
WndProc endp
;---------------------------------------
ClassName db "Uncle Remus tales:#6c Tar baby",0
expHPoint POINT <0>
FileName db "br_Rabbit3.cur",0
hBit1 HBITMAP ?
aMYBP db "MYBP1",0
memDC HDC ?
DC HDC ?
end
There are rc/asm/exe/ico/bmp/bat-files in 06.zip file
If you do not know who it is, then look at the picture and remember the tale of "brother rabbit, brother fox and tar baby"
« Last Edit: August 09, 2017, 01:24:31 AM by Mikl__ »

jj2007

  • Member
  • *****
  • Posts: 7319
  • Assembler is fun ;-)
    • MasmBasic
Re: Uncle Remus Tales
« Reply #64 on: August 03, 2017, 05:19:13 PM »
Nice example :t

invoke BitBlt,DC,,,164,206,memDC,rbx,rbx,SRCCOPY  ::)

Interesting syntax - is that an invoke macro, or a new UAsm feature? And what is pushaddr WndProc?

Btw where is this file: Error A2106: Cannot open file: "win64a.inc"?

Mikl__

  • Member
  • ****
  • Posts: 519
Re: Uncle Remus Tales
« Reply #65 on: August 03, 2017, 05:43:07 PM »
Buon giorno, amico jj2007!
Questo file è per te
P.S. è il caldo in Italia?

jj2007

  • Member
  • *****
  • Posts: 7319
  • Assembler is fun ;-)
    • MasmBasic
Re: Uncle Remus Tales
« Reply #66 on: August 03, 2017, 07:05:12 PM »
Buongiorno amico Mikl :icon14:

Si, fa molto caldo qui - 35 gradi+

Unfortunately, I get plenty of such errors:
Code: [Select]
\Masm32\Include64\temphls.inc(965) : Error A2200: Syntax error in control-flow directive
 \Masm32\Include64\temphls.inc(965): Included by
  win64a.inc(2): Included by
   Tmp_File.asm(3): Main line code
\Masm32\Include64\temphls.inc(968) : Error A2210: Syntax error: J_POLY_COND
 \Masm32\Include64\temphls.inc(968): Included by
  win64a.inc(2): Included by
   Tmp_File.asm(3): Main line code