- 鐵幣
- 295 元
- 文章
- 134 篇
- 聲望
- 161 枚
- 上次登入
- 16-3-27
- 精華
- 1
- 註冊時間
- 06-5-13
- UID
- 259457
|
教學阿,我不太會教...OTZ
不過要寫入時間的話必須先用date和time這2種指令來讀取系統時間
然後再把數字轉換成文字
例:
date %997,%996,%995 ;獲得年份的數字變量,獲得月份的數字變量,獲得日期的數字變量
time %994,%993,%992 ;獲得時的數字變量,獲得分的數字變量,獲得秒的數字變量
itoa $996,%996 ;把取得的月份轉換為文字
itoa $995,%995
itoa $994,%994
itoa $993,%993
if %1071=1 goto *box0
mov $1015,"--"
mov $1016,"--"
mov $1017,"--"
mov $1018,"--"
mov $1072," ----------"
mov %1071,1
*box0
;判斷月日時分,然後應該顯示什麼
;下面這段程式執行以後會變成
;--月--日--時--分
; ----------
if %996=1 mov $996,"01"
if %996=2 mov $996,"02"
if %996=3 mov $996,"03"
if %996=4 mov $996,"04"
if %996=5 mov $996,"05"
if %996=6 mov $996,"06"
if %996=7 mov $996,"07"
if %996=8 mov $996,"08"
if %996=9 mov $996,"09"
if %995=1 mov $995,"01"
if %995=2 mov $995,"02"
if %995=3 mov $995,"03"
if %995=4 mov $995,"04"
if %995=5 mov $995,"05"
if %995=6 mov $995,"06"
if %995=7 mov $995,"07"
if %995=8 mov $995,"08"
if %995=9 mov $995,"09"
if %994=0 mov $994,"00"
if %994=1 mov $994,"01"
if %994=2 mov $994,"02"
if %994=3 mov $994,"03"
if %994=4 mov $994,"04"
if %994=5 mov $994,"05"
if %994=6 mov $994,"06"
if %994=7 mov $994,"07"
if %994=8 mov $994,"08"
if %994=9 mov $994,"09"
if %993=0 mov $993,"00"
if %993=1 mov $993,"01"
if %993=2 mov $993,"02"
if %993=3 mov $993,"03"
if %993=4 mov $993,"04"
if %993=5 mov $993,"05"
if %993=6 mov $993,"06"
if %993=7 mov $993,"07"
if %993=8 mov $993,"08"
if %993=9 mov $993,"09"
mov $1001,$1015
add $1001,"月"
add $1001,$1016
add $1001,"日"
add $1001,$1017
add $1001,"時"
add $1001,$1018
add $1001,"分"
if %990=1 goto *saves
if %990=2 goto *loads
*saves
;再利用lsp來顯示$1001的東西
lsp 199,":s/18,18,1;#ffffff#ffffff$1001",110,47 ;顯示存檔格一的日期位置
*loads
lsp 171,":s/18,18,1;#ffffff#ffffff$1001",110,47 ;顯示讀檔格一的日期位置 |
|