The entire world map praises OpenAI for its ability to analyze, sort, and give correct feedback on a defined issue. I do not completely agree, there are still reminders related to the way of solving complex tasks. An example is creating source code in an assembler for FASM. Although FASM is very strict in terms of hardware programming, OpenAI fails to produce functional source code. I stayed yesterday for almost a few hours to analyze the result returned by OpenAI and I offered correction feedback in solving the errors and the result was negative. From my point of view, it will take a few more years until we have an OpenAI that will allow us to program in assembler. I would highlight the fact that assembler programming is used in strict areas of interest such as: automation, gaming, software drivers, and learning to program machines or hardware …
This is a combination of source code from assembly and C programming language created by OpenAI Chat, after many questions and feedback with errors, and this source code is not working:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | format PE GUI 4.0 entry start include 'INCLUDE/WIN32AX.INC' section '.data' data readable writeable consoleTitle db 'Add two numbers using MMX ',0 offset dd ? hConOut dd ? FOREGROUND_GREEN dd 10 FOREGROUND_INTENSITY dd 10 addr dd ? n dd ? sizeof.output dd 256 ; I don't find a sizeof for output sizeof.prompt dd 256 ; I don't find a sizeof for output num1 dd 1 num2 dd 2 result dd ? prompt db 'Enter two numbers to add:',0 fo db 'The result is: %d',0 ; format ?? output db 16 dup (0) section '.code' code readable executable start: ; Initialize the console invoke AllocConsole invoke GetStdHandle, STD_OUTPUT_HANDLE mov [hConOut], eax invoke SetConsoleTitle, offset consoleTitle invoke SetConsoleTextAttribute, [hConOut], FOREGROUND_GREEN or FOREGROUND_INTENSITY invoke WriteConsole, [hConOut], offset prompt, sizeof.prompt, addr n, 0 ; Read the two numbers from the console invoke ReadConsole, [hConOut], addr num1, 4, addr n, 0 invoke ReadConsole, [hConOut], addr num2, 4, addr n, 0 ; Add the two numbers with MMX movd mm0, [num1] movd mm1, [num2] paddw mm0, mm1 movd [result], mm0 emms ; Print the result to the console invoke wsprintf, offset output, offset fo, [result] invoke WriteConsole, [hConOut], offset output, sizeof.output, addr n, 0 invoke Sleep, 2000 invoke FreeConsole ret section '.idata' import data readable writeable library kernel32,'KERNEL32.DLL',user32,'USER32.DLL',gdi32,'GDI32.DLL' include 'INCLUDE/API/KERNEL32.INC' include 'INCLUDE/API/USER32.INC' include 'INCLUDE/API/GDI32.INC' |