forked from KolibriOS/kolibrios
- Renamed golang example file.
- Added DrawBar function git-svn-id: svn://kolibrios.org@8178 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b215841161
commit
fa5c356928
@ -1,4 +1,4 @@
|
||||
PROGRAM=main
|
||||
PROGRAM=example
|
||||
SOURCES=syscalls.o colors.go.o colors.gox os.go.o os.gox $(PROGRAM).go.o
|
||||
LIBOBJ=os.go.o syscalls.o colors.go.o
|
||||
GOFLAGS= -nostdlib -nostdinc -fno-stack-protector -fno-split-stack -static -m32 -g -I.
|
||||
|
@ -1,4 +1,5 @@
|
||||
package kernel
|
||||
|
||||
import "os"
|
||||
import "colors"
|
||||
|
||||
@ -21,6 +22,7 @@ func RedrawAll(bar_pos int){
|
||||
os.CreateButton(300, 128, 80, 30, Btn2, colors.Blue);
|
||||
os.WriteText(32,128, 0x11000000 | colors.White,btn_txt1, 10)
|
||||
os.WriteText(320,128, 0x11000000 | colors.White,btn_txt2, 10)
|
||||
os.DrawBar(uint32(bar_pos), 90, 100, 30, colors.Red);
|
||||
}
|
||||
|
||||
func Load() {
|
@ -1,86 +0,0 @@
|
||||
|
||||
SECTION .text
|
||||
|
||||
[GLOBAL __start]
|
||||
extern go.kernel.Load
|
||||
|
||||
global go.os.Sleep
|
||||
global go.os.Event
|
||||
global go.os.Button
|
||||
global go.os.Exit
|
||||
global go.os.Redraw
|
||||
global go.os.Window
|
||||
|
||||
__start:
|
||||
call go.kernel.Load
|
||||
ret
|
||||
|
||||
go.os.Sleep:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax, 5
|
||||
mov ebx, [ebp+8]
|
||||
int 0x40
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
|
||||
go.os.Event:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax, 10
|
||||
int 0x40
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
go.os.Button:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax, 17
|
||||
int 0x40
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
go.os.Exit:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax, -1
|
||||
int 0x40
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
|
||||
go.os.Redraw:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov eax, 12
|
||||
mov ebx, [ebp+8]
|
||||
int 0x40
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
go.os.Window:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
mov ebx, [ebp+8]
|
||||
shl ebx, 16
|
||||
or ebx, [ebp+16]
|
||||
mov ecx, [ebp+12]
|
||||
shl ecx, 16
|
||||
or ecx, [ebp+20]
|
||||
mov edx, 0x14
|
||||
shl edx, 24
|
||||
or edx, 0xFFFFFF
|
||||
mov esi, 0x808899ff
|
||||
mov edi, [ebp+24]
|
||||
xor eax, eax
|
||||
int 0x40
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
ret
|
||||
|
Loading…
Reference in New Issue
Block a user