Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
- <meta content="utf-8" http-equiv="encoding">
- <title>...</title>
- <style type="text/css" media="screen">
- #editor {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- }
- </style>
- <script src="scripts/lib/require.js"></script>
- <script>
- var ace_root = "scripts/lib/bower_components/ace/lib/ace/";
- require.config({
- baseUrl: window.location.protocol + "//" + window.location.host
- + window.location.pathname.split("/").slice(0, -1).join("/"),
- paths: {
- ace: ace_root
- }
- });
- require(["ace/ace"], function (ace) {
- var editor = ace.edit("editor");
- editor.setTheme(ace_root + "theme/tomorrow_night_bright");
- editor.getSession().setMode(ace_root + "mode/assembly_x86");
- });
- </script>
- </head>
- <body>
- <div id="editor">
- section .text
- global main ;must be declared for using gcc
- main: ;tell linker entry point
- mov edx, len ;message length
- mov ecx, msg ;message to write
- mov ebx, 1 ;file descriptor (stdout)
- mov eax, 4 ;system call number (sys_write)
- int 0x80 ;call kernel
- mov eax, 1 ;system call number (sys_exit)
- int 0x80 ;call kernel
- section .data
- msg db 'Hello, world!',0xa ;our dear string
- len equ $ - msg ;length of our dear string
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement