nasm

NASM call for external C++ function

自古美人都是妖i 提交于 2020-05-09 06:35:10
问题 I am trying to call external C++ function from NASM. As I was searching on google I did not find any related solution. C++ void kernel_main() { char* vidmem = (char*)0xb8000; /* And so on... */ } NASM ;Some calls before section .text ;nothing special here global start extern kernel_main ;our problem After running compiling these two files I am getting this error: kernel.asm(.text+0xe): undefined reference to kernel_main' What is wrong here? Thanks. 回答1: There is no standardized method of

Am I Writing Assembly Or NASM?

喜夏-厌秋 提交于 2020-04-13 07:12:50
问题 I'm fed up with this. I've been trying to just get a grip on assembly for awhile, but I feel like I'm coding towards my compiler rather than a language. I've been using this tutorial, and so far it's giving me hell. I'm using NASM, which may be the problem, but I figured it was the most popular one. I'm simply trying to learn the most general form of assembly, so I decided to learn x86. I keep running into stupid errors, like not being able to increment a variable. Here's the latest one: not

Am I Writing Assembly Or NASM?

南楼画角 提交于 2020-04-13 07:10:51
问题 I'm fed up with this. I've been trying to just get a grip on assembly for awhile, but I feel like I'm coding towards my compiler rather than a language. I've been using this tutorial, and so far it's giving me hell. I'm using NASM, which may be the problem, but I figured it was the most popular one. I'm simply trying to learn the most general form of assembly, so I decided to learn x86. I keep running into stupid errors, like not being able to increment a variable. Here's the latest one: not

Am I Writing Assembly Or NASM?

核能气质少年 提交于 2020-04-13 07:10:00
问题 I'm fed up with this. I've been trying to just get a grip on assembly for awhile, but I feel like I'm coding towards my compiler rather than a language. I've been using this tutorial, and so far it's giving me hell. I'm using NASM, which may be the problem, but I figured it was the most popular one. I'm simply trying to learn the most general form of assembly, so I decided to learn x86. I keep running into stupid errors, like not being able to increment a variable. Here's the latest one: not

OpenSSL和GmSSL在Windows下编译过程

独自空忆成欢 提交于 2020-04-07 11:27:33
OpenSSL和GmSSL在Windows下编译过程 (2018-05-31 15:02:13) 转载 ▼ 标签: openssl gmssl 分类: OpenSSL 本文用于记录GmSSL-2.0在Windows下的编译过程。 1,环境:Win7-x64,VS2015,编译WIN32库; 2,下载GmSSL-2.0源码; 3,编译:参考GmSSL官网编译说明,链接地址http://gmssl.org/docs/install.html 4,需要按照ActivePerl和NASM; NASM下载地址:www.nasm.us,下载版本:nasm-2.13.03-installer-x64.exe 需要将NASM安装目录添加至Windows系统环境变量Path中 5,打开VS Tools中“VS2015 x86 本机工具命令提示符”提示符,切换至GmSSL目录; 6,执行perl Configure VC-WIN32 7,执行nmake 8,编译完成。 本步骤同样适用与OpenSSL,已在OpenSSL-1.1.1-pre7版本上测试通过。 来源: oschina 链接: https://my.oschina.net/u/4346209/blog/3222807

OpenSSL和GmSSL在Windows下编译过程

半城伤御伤魂 提交于 2020-04-07 07:40:31
OpenSSL和GmSSL在Windows下编译过程 (2018-05-31 15:02:13) 转载 ▼ 标签: openssl gmssl 分类: OpenSSL 本文用于记录GmSSL-2.0在Windows下的编译过程。 1,环境:Win7-x64,VS2015,编译WIN32库; 2,下载GmSSL-2.0源码; 3,编译:参考GmSSL官网编译说明,链接地址http://gmssl.org/docs/install.html 4,需要按照ActivePerl和NASM; NASM下载地址:www.nasm.us,下载版本:nasm-2.13.03-installer-x64.exe 需要将NASM安装目录添加至Windows系统环境变量Path中 5,打开VS Tools中“VS2015 x86 本机工具命令提示符”提示符,切换至GmSSL目录; 6,执行perl Configure VC-WIN32 7,执行nmake 8,编译完成。 本步骤同样适用与OpenSSL,已在OpenSSL-1.1.1-pre7版本上测试通过。 来源: oschina 链接: https://my.oschina.net/u/4387121/blog/3222594

Why can't I make a char array longer than 61 characters in C? [duplicate]

限于喜欢 提交于 2020-04-07 05:27:14
问题 This question already has an answer here : Error 13: Invalid or unsupported executable while booting simple kernel in grub with string literal (1 answer) Closed 2 years ago . I'm following this tutorial to make a simple bare bones 32-bit operating system. I have gotten as far as section 4 where i'm writing to the frame buffer. Basically i'm attempting to create my own println function. Here is the code for my function: /** fb_write_cell: * Writes a character with the given foreground and

NASM Segmentation fault when modifying a variable that should be in the read-write .data section (section .data doesn't work without a space?)

核能气质少年 提交于 2020-04-05 06:41:45
问题 I'm having an issue with a program I'm writing in NASM using SASM, I'm using a variable as a counter and once I modified it and try to to save the new value at the used address in memory I get a segmentation fault. Here are the bits of code concerning the variable: section.data p_count DW 0 section.text global CMAIN CMAIN: mov ebp, esp; for correct debugging mov bx, [p_count] inc bx mov [p_count], bx ret The program stops running when it arrives at the last line here. Anyone has an idea what

Iterate over strings in assembly (NASM)

风流意气都作罢 提交于 2020-03-20 19:35:32
问题 I am trying to count the length of the string argv[1] in NASM assembly language. I think I'm on the right track. I have moved the address of argv[1] to register eax and now I want to move through it byte by byte and compare to the null string terminator. Everytime I run the code it segfaults on the null comparison. Am I not getting the memory indexing correct? *Disclaimer: This is a small part of a large homework assignment. segment .bss N: resd 1 ;counter for size of argv[1] segment .text

Iterate over strings in assembly (NASM)

拈花ヽ惹草 提交于 2020-03-20 19:32:46
问题 I am trying to count the length of the string argv[1] in NASM assembly language. I think I'm on the right track. I have moved the address of argv[1] to register eax and now I want to move through it byte by byte and compare to the null string terminator. Everytime I run the code it segfaults on the null comparison. Am I not getting the memory indexing correct? *Disclaimer: This is a small part of a large homework assignment. segment .bss N: resd 1 ;counter for size of argv[1] segment .text