From ccfb9de3e70e3408dc0d351a6bf215977a8179fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B0=D1=81=20=D0=9C=D0=B8=D1=85=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2=20WindowsDesktop?= Date: Sun, 3 Jan 2021 17:49:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=88=D1=91=D0=BB=20?= =?UTF-8?q?=D0=BD=D0=B0=20masm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ SDI.inc | 43 +++++++++++++++++++++++++++++++++++++++++++ main.asm | 50 ++++++++++++++++++++++++++++++++++---------------- sha-256.asm | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 50322ed..aa7bac3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .vscode/tasks.json main.obj main.exe +sha-256.obj +.vscode/tasks.json.etalon diff --git a/SDI.inc b/SDI.inc index c524f98..fceebdb 100644 --- a/SDI.inc +++ b/SDI.inc @@ -14,6 +14,42 @@ IncludeLib kernel32.lib ;IncludeLib debug.lib .DATA +;Макросы +MAKELANGID macro p:REQ,s:REQ ;Макрос создающий идентификатор языка + m$__langid = (s SHL 10) or p ; + EXITM ; +endm +; ------------------------------------------------------------------------- +DU MACRO name, string + name PROC + DU1 string + name ENDP +ENDM +; ------------------------------------------------------------------------- +DU1 MACRO string + LOCAL bslash + bslash=0 + IRPC c, + IF bslash EQ 0 + IF '&c' EQ "\" ;;управляющая последовательность символов + bslash=1 + ELSEIF '&c' GT 127 + DB ('&c'- 0B0h), 4 ;;кириллица + ELSE + DW '&c' ;;латиница + ENDIF + ELSE + bslash=0 + IF '&c' EQ "n" ;; \n = новая строка + DW 0Dh + ELSEIF '&c' EQ "r";; \r = возврат каретки + DW 0Ah + ENDIF + ENDIF + ENDM + DW 0 +ENDM +; ------------------------------------------------------------------------- ClassName DB "MainWinClass",0 szAppName DB "SDI Application",0 MenuName DB "FirstMenu",0 @@ -21,13 +57,20 @@ szFileNew DB "You selected 'New'.",0 szFileOpen DB "You selected 'Open'.",0 szHelpAbout DB "You selected 'About'.",0 +DU ButtonClassName,