Answer the question
In order to leave comments, you need to log in
How to display the image of the symbol "N" in assembler using pseudographics in text mode?
It is necessary to display the image of the symbol "N" using pseudographics.
As I understand it, pseudographic characters are located between 176 and 223 codes in the ASCII table. But I don’t know what to do next with this, because in fact, only today I started learning assembler, and I already need to do such a task.
I have an example of how to display the character "O" using pseudographics, but this program does not even want to compile, because it has errors. Here is the code:
.686
.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
.data
hConsoleOutput dd 0
NumberOfCharsWritten dd 0
Symbol db 60 dup (32),10,13
db 19 dup (32),26 dup(219),19 dup (32), 10, 13
db 17 dup (32),2 dup(219),7 dup(176),2 dup(219),8 dup(32),2 dup(219),7 dup(176),2
dup(219),17 dup(32), 10, 13
db 15 dup (32),2 dup(219),7 dup(176),2 dup(219),12 dup(32),2 dup(219),7 dup(176),2
dup(219),15 dup(32), 10,13
db 13 dup (32),2 dup(219),7 dup(176),2 dup(219),16 dup(32),2 dup(219),7 dup(176),2
dup(219),13 dup(32), 10,13
db 11 dup (32),2 dup(219),7 dup(176),2 dup(219),20 dup(32),2 dup(219),7 dup(176),2
dup(219),11 dup(32), 10,13
db 8 dup( 9 dup (32),2 dup(219),7 dup(176),2 dup(219),24 dup(32),2 dup(219),7
dup(176),2 dup(219),9 dup(32), 10,13)
db 11 dup (32),2 dup(219),7 dup(176),2 dup(219),20 dup(32),2 dup(219),7 dup(176),2
dup(219),11 dup(32), 10,13
db 13 dup (32),2 dup(219),7 dup(176),2 dup(219),16 dup(32),2 dup(219),7 dup(176),2
dup(219),13 dup(32), 10,13
db 15 dup (32),2 dup(219),7 dup(176),2 dup(219),12 dup(32),2 dup(219),7 dup(176),2
dup(219),15 dup(32), 10,13
db 17 dup (32),2 dup(219),7 dup(176),2 dup(219),8 dup(32),2 dup(219),7 dup(176),2
dup(219),17 dup(32), 10,13
db 19 dup (32),26 dup(219),19 dup (32),13,10
db 60 dup (32),10,13
NumberOfCharsToWrite dd $-Symbol
ReadBuf db 128 dup(?)
hConsoleInput dd 0
.code
start:
call AllocConsole
push -11
call GetStdHandle
mov hConsoleOutput, eax
push 0
push offset NumberOfCharsWritten
push NumberOfCharsToWrite
push offset Symbol
push hConsoleOutput
call WriteConsoleA
push -10
call GetStdHandle
mov hConsoleInput, eax
push 0
push offset NumberOfCharsWritten
push 128
push offset ReadBuf
push hConsoleInput
call ReadConsoleA
push 0
call ExitProcess
end start
Answer the question
In order to leave comments, you need to log in
I don't understand at all what most commands do, especially what code like
Symbol db 60 dup (32),10,13 db 19 dup (32),26 dup(219) is for
_ ██████████████████████████
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██░░░░░░░██ ██░░░░░░░██
██████████████████████████
I paste this code, save it, then click Project -> Build All (I tried it in different ways). And I get this result:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question