Created
April 8, 2021 10:41
-
-
Save Arnolxu/aee6d792ba308e1db94f4fcb9b33486a to your computer and use it in GitHub Desktop.
Basit bir MikeOS uygulaması, for educational purposes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BITS 16 | |
ORG 32768 | |
%INCLUDE "mikedev.inc" | |
mov ax, title_msg ; Başlık | |
mov bx, footer_msg ; Altlık ya da her ne deniliyorsa. | |
mov cx, 00100000b ; Renk. Kaynak kısmında bu renkleri nasıl | |
; yazacağınızı bulabilirsiniz. Ben yeşil yaptım. | |
call os_draw_background ; Sistem çağrısı. | |
mov bx, input_msg | |
mov ax, input_input | |
call os_input_dialog | |
; Ekranı temizliyoruz ve arkaplanı tekrar çiziyoruz. | |
call os_clear_screen | |
mov ax, title_msg ; title_msg ve footer_msg'yi tanımlamıştık, hatırlıyor musunuz? | |
mov bx, footer_msg | |
mov cx, 00100000b | |
call os_draw_background | |
; Diyalog 3 satır destekler. Biz metni 1. satıra yazdıracağız. | |
mov ax, input_input | |
; Ama 2. ve 3. satırları boş bırakacağız. | |
mov bx, 0 | |
mov cx, 0 | |
; Diyalog "OK/CANCEL" şeklinde mi yoksa "OK" şeklinde mi olacak? "OK" şeklinde. | |
mov dx, 0 | |
; Diyalog için sistem çağrısı. | |
call os_dialog_box | |
; Uygulamayı bitiriyoruz. | |
call os_clear_screen | |
ret | |
; Dosyanın en alt kısmı. | |
title_msg db 'Test uygulamasi', 0 | |
footer_msg db 'v0.0.1', 0 | |
input_msg db 'Gosterilecek metni girin.', 0 | |
input_input times 12 db 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment