Author Topic: Uncle Remus Tales  (Read 3187 times)

HSE

  • Member
  • ****
  • Posts: 550
  • <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: 554
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: 7728
  • 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: 554
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: 7728
  • 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: 554
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: 7728
  • 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

Mikl__

  • Member
  • ****
  • Posts: 554
Re: Uncle Remus Tales
« Reply #67 on: August 24, 2017, 11:42:04 PM »
tut_035-06.rc
Code: [Select]
#include "resource.h"
#define IDR_MAINMENU                    101
#define IDD_OPTIONDLG                   101
#define IDD_GOTODLG                     102
#define IDR_MAINACCEL                   103

#define IDC_BACKCOLORBOX                1000
#define IDC_TEXTCOLORBOX                1001
#define IDC_OK 1002
#define IDC_CANCEL 1003
#define IDC_LINENO                      1004
#define IDM_OPEN                        40001
#define IDM_SAVE                        40002
#define IDM_CLOSE                       40003
#define IDM_SAVEAS                      40004
#define IDM_EXIT                        40005
#define IDM_COPY                        40006
#define IDM_CUT                         40007
#define IDM_PASTE                       40008
#define IDM_DELETE                      40009
#define IDM_SELECTALL                   40010
#define IDM_OPTION                      40011
#define IDM_UNDO                        40012
#define IDM_REDO                        40013
#define IDM_FIND                        40014
#define IDM_FINDNEXT                    40015
#define IDM_REPLACE                     40016
#define IDM_GOTOLINE                    40017
#define IDM_FINDPREV                    40018
#define IDC_ICON1    500

IDC_ICON1 ICON "..\\Images\\br_Fox1.ico"
IDR_MAINMENU MENU DISCARDABLE
{
    POPUP "&File"
    {
        MENUITEM "&Open\tCtrl+O",               IDM_OPEN
        MENUITEM "Close\tCtrl+W",               IDM_CLOSE
        MENUITEM "&Save\tCtrl+S",               IDM_SAVE
        MENUITEM "Save As\tF12",                IDM_SAVEAS
        MENUITEM SEPARATOR
        MENUITEM "Exit\tAlt+F4",                IDM_EXIT
    }
    POPUP "&Edit"
    {
        MENUITEM "Undo\tCtrl+Z",                IDM_UNDO
        MENUITEM "Redo\tCtrl+Y",                IDM_REDO
        MENUITEM "&Copy\tCtrl+C",               IDM_COPY
        MENUITEM "Cut\tCtrl+X",                 IDM_CUT
        MENUITEM "Paste\tCtrl+V",               IDM_PASTE
        MENUITEM SEPARATOR
        MENUITEM "Delete\tDel",                 IDM_DELETE
        MENUITEM SEPARATOR
        MENUITEM "Select &All\tCtrl+A",         IDM_SELECTALL
    }
    POPUP "&Search"
    {
        MENUITEM "&Find...\tCtrl+F",            IDM_FIND
        MENUITEM "Find &Next\tF3",              IDM_FINDNEXT
        MENUITEM "Find &Prev\tCtrl+F3",        IDM_FINDPREV
        MENUITEM "&Replace...\tCtrl+R",          IDM_REPLACE
        MENUITEM SEPARATOR
        MENUITEM "&Go To Line\tCtrl+G",         IDM_GOTOLINE
    }
    MENUITEM "&Options",                         IDM_OPTION
}


IDD_OPTIONDLG DIALOG DISCARDABLE  0, 0, 183, 54
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Options"
FONT 8, "MS Sans Serif"
{
    DEFPUSHBUTTON   "OK",IDC_OK,137,7,39,14
    PUSHBUTTON      "Cancel",IDC_CANCEL,137,25,39,14
    GROUPBOX        "",IDC_STATIC,5,0,124,49
    LTEXT           "Background Color:",IDC_STATIC,20,14,60,8
    LTEXT           "",IDC_BACKCOLORBOX,85,11,28,14,SS_NOTIFY | WS_BORDER
    LTEXT           "Text Color:",IDC_STATIC,20,33,35,8
    LTEXT           "",IDC_TEXTCOLORBOX,85,29,28,14,SS_NOTIFY | WS_BORDER
}

IDD_GOTODLG DIALOGEX 0, 0, 106, 30
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW
CAPTION "Перейти на строку"
FONT 8, "MS Sans Serif", 0, 0, 1
{
    EDITTEXT        IDC_LINENO,32,4,30,11,ES_AUTOHSCROLL | ES_NUMBER,
                    WS_EX_CLIENTEDGE
    DEFPUSHBUTTON   "OK",IDOK,70,4,31,11
    PUSHBUTTON      "Отмена",IDCANCEL,70,17,31,11
    LTEXT           "Строка:",IDC_STATIC,1,5,30,8
}

IDR_MAINACCEL ACCELERATORS DISCARDABLE
{  // определение акселераторов
 "^O",IDM_OPEN
 "^W",IDM_CLOSE
 "^S",IDM_SAVE
 VK_F12,IDM_SAVEAS,VIRTKEY
 "^F",IDM_FIND
 "^G",IDM_GOTOLINE
 "^R",IDM_REPLACE
 VK_F3,IDM_FINDNEXT,VIRTKEY
 VK_F3,IDM_FINDPREV,VIRTKEY,CONTROL
}
asm/ico/cur/rc/exe-files in attach

Mikl__

  • Member
  • ****
  • Posts: 554
Re: Uncle Remus Tales
« Reply #68 on: August 26, 2017, 07:54:15 PM »
Tiny IDE

Mikl__

  • Member
  • ****
  • Posts: 554
Re: Uncle Remus Tales
« Reply #69 on: August 27, 2017, 02:34:33 AM »
Files in the archive have been downloaded 71 times, and nobody asks about the files content in the archive. It is very strange... These are mail-bots!
Wow! File 36.zip was downloaded 140 times... Maybe somewhere installed a mirror site of this web-page
« Last Edit: August 27, 2017, 01:30:23 PM by Mikl__ »

mineiro

  • Member
  • ***
  • Posts: 365
Re: Uncle Remus Tales
« Reply #70 on: August 27, 2017, 09:22:06 PM »
hello Mikl___
I have tried 35 and 36 files on linux under wine and received an error message. Sounds to me that wine don't have that function being called implemented but that's a default function so this is why I'm posting. What I'm thinking is just a function name convention I suppose (not sure). I don't know if you like to do that program wine compatible. I don't have windows on my machine this is why I don't have tried on windows ok.
This is the error I'm receiving, number 35 have same error on same function and same memory address in my machine:
:~/.wine/drive_c/36$ wine tut_36.exe
wine: Call from 0x7f53e39fce38 to unimplemented function ntdll.dll.NtdllDefWindowProc_A, aborting
wine: Unimplemented function ntdll.dll.NtdllDefWindowProc_A called at address 0x7f53e39fce38 (thread 0024), starting debugger...
When I dump disassembled tut_36.exe to see headers sections I found this (other functions are omited):
        2d0e      567  NtdllDefWindowProc_A

If you have intentions to do this wine compatible I can do some tests on my machine.

--Oh, I forgot to say, this is just a first view, I'm investigating this on my machine to see if it is a wine error ok. So, your example can be right and the function is really not implemented on wine.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

Mikl__

  • Member
  • ****
  • Posts: 554
Re: Uncle Remus Tales
« Reply #71 on: August 27, 2017, 10:26:15 PM »
Olá Mineiro! No meu Windows 7 x64 existem
NTDLL.RtlExitUserProcess é redirecionado para Kernel32.ExitProcess
NTDLL.NtdllDialogWndProc_A é redirecionado para User32.DefDlgProcA
NTDLL.NtdllDefWindowProc_A é redirecionado para User32.DefWindowProcA
Eu pensei que era melhor chamar as funções diretamente de NTDLL.dll e não através das absorvente-funções. Estou usando um bat-file
Code: [Select]
set FileName=user32
dumpbin.exe /EXPORTS %windir%\System32\%FileName%.dll /OUT:%FileName%.txt
« Last Edit: August 27, 2017, 11:26:16 PM by Mikl__ »