如何在Z80组件中创建变量?

时间:2016-08-25 23:08:04

标签: variables assembly z80 gameboy

我正在尝试创建一个包含十六进制值SET的简单变量。我已经能够将其作为ld _time,$ffff的宏来实现,但我无法使用_time之类的内容。如何将值加载到; WITH OpenOrders AS ( SELECT OrderID , OpenItemCount = COUNT(CASE WHEN NULLIF(fillInfo, '') IS NULL THEN 1 ELSE 0 END) , FilledItemCount = COUNT(CASE WHEN NULLIF(fillInfo, '') IS NOT NULL THEN 1 ELSE 0 END) , TotalItemCount = COUNT(1) FROM OrderDetails details WHERE NULLIF(fillInfo, '') IS NULL GROUP BY OrderID ) SELECT o.orderID , o.orderDate , o.oStatus , e.userName , o.poNumber , c.customerName , c.company , o.source , Total = ( (SELECT SUM(od.price * od.qty) FROM OrderDetails od WHERE o.orderID = od.orderID) + o.salesTax + o.shippingFee ) , Filled = od.FilledItemCount FROM Orders o JOIN Customers c ON o.customerID = c.customerID JOIN Employees e ON o.employeeID = e.employeeID JOIN OpenOrders op ON o.OrderID = op.OrderID WHERE o.employeeID > 0 AND o.oStatus = 'Active' ORDER BY o.orderID

1 个答案:

答案 0 :(得分:1)

我的问题是我没有初始化_time。以下工作:

_time SET $ff
ld hl, $ffff
ld (_time),hl